hafent
驱动牛犊
驱动牛犊
  • 注册日期2001-09-04
  • 最后登录2018-05-29
  • 粉丝0
  • 关注0
  • 积分12分
  • 威望43点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
  • 社区居民
阅读:5032回复:1

error LNK2001: unresolved external symbol

楼主#
更多 发布于:2005-08-08 23:14
  我有一个程序,之前调用opencv中一个dll的几个函数,现在被要求不用dll,就把opencv中定义这些函数的.h文件和.cpp文件都添加到程序的工程文件中去了,然后就出现了如下的这么多的错误信息:

Linking...
cvcmp.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvcopy.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvdatastructs.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvlogic.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvconvert.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvarray.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvmorph.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvaffine.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvsamplers.obj : error LNK2001: unresolved external symbol "int const * const  icvPixSize" (?icvPixSize@@3QBHB)
cvarray.obj : error LNK2001: unresolved external symbol "char const * const  icvDepthToType" (?icvDepthToType@@3QBDB)
cvarithm.obj : error LNK2001: unresolved external symbol "float const * const  icv8x32fTab" (?icv8x32fTab@@3QBMB)
cvarray.obj : error LNK2001: unresolved external symbol "float const * const  icv8x32fTab" (?icv8x32fTab@@3QBMB)
cvsmooth.obj : error LNK2001: unresolved external symbol "float const * const  icv8x32fTab" (?icv8x32fTab@@3QBMB)
cvsamplers.obj : error LNK2001: unresolved external symbol "float const * const  icv8x32fTab" (?icv8x32fTab@@3QBMB)
cvconvert.obj : error LNK2001: unresolved external symbol "float const * const  icv8x32fTab" (?icv8x32fTab@@3QBMB)
cvarray.obj : error LNK2001: unresolved external symbol "int const * const  icvTypeToDepth" (?icvTypeToDepth@@3QBHB)
window_w32.obj : error LNK2001: unresolved external symbol __imp__RegisterClassA@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetStockObject@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__LoadIconA@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetWindowLongA@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__CreateCompatibleDC@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__ShowWindow@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
window_w32.obj : error LNK2001: unresolved external symbol __imp__SendMessageA@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__MoveWindow@24
window_w32.obj : error LNK2001: unresolved external symbol __imp__SubtractRect@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__OffsetRect@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetObjectA@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetCurrentObject@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__UpdateWindow@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__InvalidateRect@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__CreateDIBSection@24
window_w32.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__SelectObject@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__FillRgn@12
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetClassLongA@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__CombineRgn@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__CreateRectRgn@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetFocus@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__DefWindowProcA@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetWindowLongA@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__DeleteDC@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetCursor@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__EndPaint@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__StretchBlt@44
window_w32.obj : error LNK2001: unresolved external symbol __imp__BitBlt@36
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetDIBColorTable@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetStretchBltMode@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__BeginPaint@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetCapture@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetKeyState@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4
window_w32.obj : error LNK2001: unresolved external symbol __imp__PeekMessageA@20
window_w32.obj : error LNK2001: unresolved external symbol __imp__GetMessageA@16
window_w32.obj : error LNK2001: unresolved external symbol __imp__CreateToolbarEx@52
window_w32.obj : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
window_w32.obj : error LNK2001: unresolved external symbol __imp__CallWindowProcA@20
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtTiff::GrFmtTiff(void)" (??0GrFmtTiff@@QAE@XZ)
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtPxM::GrFmtPxM(void)" (??0GrFmtPxM@@QAE@XZ)
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtSunRaster::GrFmtSunRaster(void)" (??0GrFmtSunRaster@@QAE@XZ)
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtJpeg::GrFmtJpeg(void)" (??0GrFmtJpeg@@QAE@XZ)
loadsave.obj : error LNK2001: unresolved external symbol "public: bool __thiscall GrFmtFactoriesList::AddFactory(class GrFmtFilterFactory *)" (?AddFactory@GrFmtFactoriesList@@QAE_NPAVGrFmtFilterFactory@@@Z)
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtBmp::GrFmtBmp(void)" (??0GrFmtBmp@@QAE@XZ)
loadsave.obj : error LNK2001: unresolved external symbol "public: __thiscall GrFmtFactoriesList::GrFmtFactoriesList(void)" (??0GrFmtFactoriesList@@QAE@XZ)
cvcolor.obj : error LNK2001: unresolved external symbol "unsigned char const * const  icvSaturate8u" (?icvSaturate8u@@3QBEB)
cvarithm.obj : error LNK2001: unresolved external symbol "unsigned char const * const  icvSaturate8u" (?icvSaturate8u@@3QBEB)
cverror.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
cverror.obj : error LNK2001: unresolved external symbol __imp__wsprintfA
Debug/PALM_ENROLL_005.exe : fatal error LNK1120: 61 unresolved externals
Error executing link.exe.

请问,我要怎么样才能解决这些问题呀,是在没办法了,请各位帮助,急!
znsoft
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2023-10-25
  • 粉丝300
  • 关注6
  • 积分910分
  • 威望14796点
  • 贡献值7点
  • 好评度2410点
  • 原创分5分
  • 专家分100分
  • 社区居民
  • 最爱沙发
  • 社区明星
沙发#
发布于:2005-08-08 23:19
如果你的程序是用c写的(程序扩展名为c) 那请使用extern "C"修饰
http://www.zndev.com 免费源码交换网 ----------------------------- 软件创造价值,驱动提供力量! 淡泊以明志,宁静以致远。 ---------------------------------- 勤用搜索,多查资料,先搜再问。
游客

返回顶部