el_fuerte

hi

i'm trying to compile a c++ project in vs.net 2005 and i get this errors

Error 2 error LNK2028: unresolved token (0A000078) "extern "C" void __cdecl cvReleaseImage(struct _IplImage * *)" ( cvReleaseImage@@$$J0YAXPAPAU_IplImage@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj


Error 3 error LNK2028: unresolved token (0A00007F) "extern "C" void __cdecl cvFindCornerSubPix(void const *,struct CvPoint2D32f *,int,struct CvSize,struct CvSize,struct CvTermCriteria)" ( cvFindCornerSubPix@@$$J0YAXPBXPAUCvPoint2D32f@@HUCvSize@@2UCvTermCriteria@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj


Error 4 error LNK2028: unresolved token (0A000082) "extern "C" void __cdecl cvCopy(void const *,void *,void const *)" ( cvCopy@@$$J0YAXPBXPAX0@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 5 error LNK2028: unresolved token (0A000093) "extern "C" struct CvMat * __cdecl cvCreateMat(int,int,int)" ( cvCreateMat@@$$J0YAPAUCvMat@@HHH@Z) referenced in function "public: void __thiscall RT_UNDISTORT_INFO:Tongue TiedetUndistortMaps(void)" ( setUndistortMaps@RT_UNDISTORT_INFO@@$$FQAEXXZ) rtCalib.obj
Error 6 error LNK2028: unresolved token (0A000097) "extern "C" struct _IplImage * __cdecl cvLoadImage(char const *,int)" ( cvLoadImage@@$$J0YAPAU_IplImage@@PBDH@Z) referenced in function "int __cdecl main(void)" ( main@@$$HYAHXZ) rtCalib.obj
Error 7 error LNK2028: unresolved token (0A00009C) "extern "C" void __cdecl cvInitUndistortMap(struct CvMat const *,struct CvMat const *,void *,void *)" ( cvInitUndistortMap@@$$J0YAXPBUCvMat@@0PAX1@Z) referenced in function "public: void __thiscall RT_UNDISTORT_INFO:Tongue TiedetUndistortMaps(void)" ( setUndistortMaps@RT_UNDISTORT_INFO@@$$FQAEXXZ) rtCalib.obj
Error 8 error LNK2028: unresolved token (0A0000A0) "extern "C" int __cdecl cvFindChessboardCorners(void const *,struct CvSize,struct CvPoint2D32f *,int *,int)" ( cvFindChessboardCorners@@$$J0YAHPBXUCvSize@@PAUCvPoint2D32f@@PAHH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 9 error LNK2028: unresolved token (0A0000CE) "extern "C" void __cdecl cvDrawChessboardCorners(void *,struct CvSize,struct CvPoint2D32f *,int,int)" ( cvDrawChessboardCorners@@$$J0YAXPAXUCvSize@@PAUCvPoint2D32f@@HH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 10 error LNK2028: unresolved token (0A0000D8) "extern "C" void __cdecl cvCalibrateCamera2(struct CvMat const *,struct CvMat const *,struct CvMat const *,struct CvSize,struct CvMat *,struct CvMat *,struct CvMat *,struct CvMat *,int)" ( cvCalibrateCamera2@@$$J0YAXPBUCvMat@@00UCvSize@@PAU1@222H@Z) referenced in function "void __cdecl cvCalibrateCamera(int,int *,struct CvSize,struct CvPoint2D32f *,struct CvPoint3D32f *,float *,float *,float *,float *,int)" ( cvCalibrateCamera@@$$FYAXHPAHUCvSize@@PAUCvPoint2D32f@@PAUCvPoint3D32f@@PAM444H@Z) rtCalib.obj
Error 11 error LNK2028: unresolved token (0A0000DA) "extern "C" void __cdecl cvRemap(void const *,void *,void const *,void const *,int,struct CvScalar)" ( cvRemap@@$$J0YAXPBXPAX00HUCvScalar@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 12 error LNK2028: unresolved token (0A0000EB) "extern "C" struct _IplImage * __cdecl cvCreateImage(struct CvSize,int,int)" ( cvCreateImage@@$$J0YAPAU_IplImage@@UCvSize@@HH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 13 error LNK2028: unresolved token (0A0000FC) "extern "C" void __cdecl cvCvtColor(void const *,void *,int)" ( cvCvtColor@@$$J0YAXPBXPAXH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 14 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvCalibrateCamera2(struct CvMat const *,struct CvMat const *,struct CvMat const *,struct CvSize,struct CvMat *,struct CvMat *,struct CvMat *,struct CvMat *,int)" ( cvCalibrateCamera2@@$$J0YAXPBUCvMat@@00UCvSize@@PAU1@222H@Z) referenced in function "void __cdecl cvCalibrateCamera(int,int *,struct CvSize,struct CvPoint2D32f *,struct CvPoint3D32f *,float *,float *,float *,float *,int)" ( cvCalibrateCamera@@$$FYAXHPAHUCvSize@@PAUCvPoint2D32f@@PAUCvPoint3D32f@@PAM444H@Z) rtCalib.obj
Error 15 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvInitUndistortMap(struct CvMat const *,struct CvMat const *,void *,void *)" ( cvInitUndistortMap@@$$J0YAXPBUCvMat@@0PAX1@Z) referenced in function "public: void __thiscall RT_UNDISTORT_INFO:Tongue TiedetUndistortMaps(void)" ( setUndistortMaps@RT_UNDISTORT_INFO@@$$FQAEXXZ) rtCalib.obj
Error 16 error LNK2019: unresolved external symbol "extern "C" struct CvMat * __cdecl cvCreateMat(int,int,int)" ( cvCreateMat@@$$J0YAPAUCvMat@@HHH@Z) referenced in function "public: void __thiscall RT_UNDISTORT_INFO:Tongue TiedetUndistortMaps(void)" ( setUndistortMaps@RT_UNDISTORT_INFO@@$$FQAEXXZ) rtCalib.obj
Error 17 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvReleaseImage(struct _IplImage * *)" ( cvReleaseImage@@$$J0YAXPAPAU_IplImage@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 18 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvRemap(void const *,void *,void const *,void const *,int,struct CvScalar)" ( cvRemap@@$$J0YAXPBXPAX00HUCvScalar@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 19 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvCopy(void const *,void *,void const *)" ( cvCopy@@$$J0YAXPBXPAX0@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 20 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvDrawChessboardCorners(void *,struct CvSize,struct CvPoint2D32f *,int,int)" ( cvDrawChessboardCorners@@$$J0YAXPAXUCvSize@@PAUCvPoint2D32f@@HH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 21 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvFindCornerSubPix(void const *,struct CvPoint2D32f *,int,struct CvSize,struct CvSize,struct CvTermCriteria)" ( cvFindCornerSubPix@@$$J0YAXPBXPAUCvPoint2D32f@@HUCvSize@@2UCvTermCriteria@@@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 22 error LNK2019: unresolved external symbol "extern "C" int __cdecl cvFindChessboardCorners(void const *,struct CvSize,struct CvPoint2D32f *,int *,int)" ( cvFindChessboardCorners@@$$J0YAHPBXUCvSize@@PAUCvPoint2D32f@@PAHH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 23 error LNK2019: unresolved external symbol "extern "C" void __cdecl cvCvtColor(void const *,void *,int)" ( cvCvtColor@@$$J0YAXPBXPAXH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 24 error LNK2019: unresolved external symbol "extern "C" struct _IplImage * __cdecl cvCreateImage(struct CvSize,int,int)" ( cvCreateImage@@$$J0YAPAU_IplImage@@UCvSize@@HH@Z) referenced in function "void __cdecl rt_ProcessFrame(struct _IplImage *)" ( rt_ProcessFrame@@$$FYAXPAU_IplImage@@@Z) rtCalib.obj
Error 25 error LNK2019: unresolved external symbol "extern "C" struct _IplImage * __cdecl cvLoadImage(char const *,int)" ( cvLoadImage@@$$J0YAPAU_IplImage@@PBDH@Z) referenced in function "int __cdecl main(void)" ( main@@$$HYAHXZ) rtCalib.obj
Error 26 fatal error LNK1120: 24 unresolved externals E:\Documents and Settings\forte\Desktop\Calib_Saved_frames\Debug\Calib_Saved_frames.exe 1

i have no idea what might be... what is causing this

any tip will be helpful

thanks

j.Lourenco




Re: Visual C++ General .obj Errors in vs.net 2005

einaros

You need to link the static library or import library which provides the definition for the various cv* functions and structures. I assume this is a third party library you're using, which comes with its own pre-compiled .lib-files. In either case, turn to the documentation for the library, and add the correct .lib-files to your project's imports (listed in your project properties' configuration properties -> linker section).





Re: Visual C++ General .obj Errors in vs.net 2005

einaros

And for future reference: when you see an error you don't recognize, open msdn.microsoft.com or your local MSDN docs, and search for the error code (such as LNK2028). The error's description page usually tells you what the problem is, and what you can do to resolve it.






Re: Visual C++ General .obj Errors in vs.net 2005

el_fuerte

hi einaros

i have done yet what you said even before i posted here the previous message, in configuration properties->linker section->Additional Library Directories my path is "E:\Program Files\OpenCV\lib" which is the path of the folder that contains my all " *.lib " files, the only lib files that have something to do with cv... functions and strutures...

the errors are the same

any other tip

P.S. the item "Ignore import library" in linker section takes "YES" but 've already switch it to "NO" and the errors persists..

one more time thanks

j.Lourenco






Re: Visual C++ General .obj Errors in vs.net 2005

einaros

Adding folders to the "Additional library directories" will not link anything to your project. You have to specify which lib files you want to link in the "Additional Dependencies" box.





Re: Visual C++ General .obj Errors in vs.net 2005

el_fuerte

i've done it !!!

now i have a silly error i think

take a look:

Error 2 error C2664: 'sscanf' : cannot convert parameter 1 from 'System:Tongue Tiedtring ^' to 'const char *' e:\Documents and Settings\forte\Desktop\pgrflycap_copia(ORIGINAL)\FlyCapDoc.cpp 180
Error 3 error C2664: 'sscanf' : cannot convert parameter 1 from 'System:Tongue Tiedtring ^' to 'const char *' e:\Documents and Settings\forte\Desktop\pgrflycap_copia(ORIGINAL)\FlyCapDoc.cpp 180
Error 4 error C2664: 'sscanf' : cannot convert parameter 1 from 'System:Tongue Tiedtring ^' to 'const char *' e:\Documents and Settings\forte\Desktop\pgrflycap_copia(ORIGINAL)\FlyCapDoc.cpp 222

.... and 20 more iqual to this ones...

this seems to be stupid, i not using any call sscanf in my code..., unless if it is used in a implicit way

what can i say Big Smile

thanks for any idea...






Re: Visual C++ General .obj Errors in vs.net 2005

einaros

Well, line 180 of flycapdoc.cpp *is* trying to pass a .NET String to sscanf, and that's not going to work. Have you checked the source





Re: Visual C++ General .obj Errors in vs.net 2005

Krish Reddy

I had the same error and I've found a solution for this @
http://opencvlibrary.sourceforge.net/VisualC++

  • Choose from menu: "Project" -> "Properties".

  • Choose "Linker" tab -> "Input" category -> "Additional Dependencies:". Add the paths to all neccessary import libraries (cxcore.lib cv.lib highgui.lib cvaux.lib cvcam.lib)