Traincascade link problem?
Hello,
Since this is my first post, I will try to make it as clear as possible so that people could try to find the reason of this error together with me.
Brief: I am running openCV 2.4.2 on Windows 7 x64 and with Visual Studio 2010 C++ compiler
As followed by multiple guides online I made sure the following configurations were made
1) Be sure that Visual Studio knows that the win32 console application is for x64 bit system
2) At the C/C++ general settings of the project I got the following additional include directories
- D:\OpenCV2.4\build\include
- D:\OpenCV2.4\build\include\opencv
- D:\OpenCV2.4\build\include\opencv2
3) At the linker settings I added at general settings the following additional library directory
- D:\OpenCV2.4\build\x64\vc10\lib\
4) At the linker settings I added at the input settings the following additional dependencies
- opencv_core240d.lib
- opencv_imgproc240d.lib
- opencv_highgui240d.lib
- opencv_objdetect240d.lib
- opencv_calib3d240d.lib
- opencv_video240d.lib
- opencv_features2d240d.lib
- opencv_flann240d.lib
- opencv_legacy240d.lib
5)Included inside the project is all the files that can be found for the traincascade application under the folder:
- D:\OpenCV2.4\apps\traincascade\
This all should be enough to compile the traincascade.cpp file, in order to be able to train a classifier myself.
But I keep getting the following linking errors:
1>------ Build started: Project: traincascade, Configuration: Debug x64 ------
1>Build started 19/09/2012 16:02:53.
1>InitializeBuildStatus:
1> Touching "x64\Debug\traincascade.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>traincascade.obj : error LNK2019: unresolved external symbol "public: bool __cdecl CvCascadeClassifier::train(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,int,int,int,int,classCvCascadeParams const &,class CvFeatureParams const &,struct CvCascadeBoostParams const &,bool)" (?train@CvCascadeClassifier@QEAA_NV?$basic_string@DU?$char_traits@D@std@V?$allocator@D@2@std@00HHHHHAEBVCvCascadeParams@AEBVCvFeatureParams@AEBUCvCascadeBoostParams@_N@Z) referenced in function main
1>traincascade.obj : error LNK2019: unresolved external symbol "public: virtual bool __cdecl CvCascadeBoostParams::scanAttr(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?scanAttr@CvCascadeBoostParams@UEAA_NV?$basic_string@DU?$char_traits@D@std@V?$allocator@D@2@std@0@Z) referenced in function main
1>traincascade.obj : error LNK2019: unresolved external symbol "public: virtual bool __cdecl CvCascadeParams::scanAttr(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?scanAttr@CvCascadeParams@UEAA_NV?$basic_string@DU?$char_traits@D@std@V?$allocator@D@2@std@0@Z) referenced in function main
1>traincascade.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl CvCascadeBoostParams::printDefaults(void)const " (?printDefaults@CvCascadeBoostParams@UEBAXXZ) referenced in function main
1>traincascade.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl CvCascadeParams::printDefaults ...