阅读:5032回复:1
error LNK2001: unresolved external symbol
我有一个程序,之前调用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. 请问,我要怎么样才能解决这些问题呀,是在没办法了,请各位帮助,急! |
|
沙发#
发布于:2005-08-08 23:19
如果你的程序是用c写的(程序扩展名为c) 那请使用extern "C"修饰
|
|
|