opencv - error LNK2019: unresolved external symbol _ Open CV program -
i learning open cv , same trying few programs. referring link. http://docs.opencv.org/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.html
i using visual studio 10 run same, , think somewhere have messed configuration. facing same problem in couple of more programs (picked same source) ,
the error follows:-
1>main.obj : error lnk2019: unresolved external symbol "int __cdecl cv::waitkey(int)" (?waitkey@cv@@yahh@z) referenced in function __catch$_main$0
1>main.obj : error lnk2019: unresolved external symbol "class cv::mat __cdecl cv::subspacereconstruct(class cv::_inputarray const &,class cv::_inputarray const &,class cv::_inputarray const &)" (?subspacereconstruct@cv@@ya?avmat@1@abv_inputarray@1@00@z) referenced in function __catch$_main$0
..... (more such unresolved external symbol error)
1>main.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall cv::_inputarray::empty(void)const " (?empty@_inputarray@cv@@ube_nxz)
1>c:\users\isenses\documents\visual studio 2010\projects\gender_classification\debug\gender_classification.exe : fatal error lnk1120: 37 unresolved externals
1>
1>build failed.
1>time elapsed 00:00:00.36
========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
my project properties follows:-
properties->configuration properties ->debugging->command arguments->c:\users\isenses\documents\visual studio 2010\projects\gender_classification\csv.txt
properties->configuration properties ->vc++ directories->include directories->(added c:\program files (x86)\microsoft visual studio 10.0\vc\lib &
c:\opencv_2.4\opencv\build\x86\vc10\lib)
c/c++->general->additional include directories (added include path of opencv ie:- c:\opencv_2.4\opencv\build
linker->general--- enable incremental linking=no
additional library directories=c:\program files %28x86%29\microsoft visual studio 10.0\vc\lib
c:\opencv_2.4\opencv\build\x86\vc10
linker->system---subsystem= /subsystem:console
linker->input--- additional dependencies= wsock32.lib opencv_contrib2411d.lib
opencv_calib3d2411d.lib
opencv_ml2411d.lib
opencv_objdetect2411d.lib
thank you.
thanks @miki able build file successfully. solution problem was:-
- adding proper additional dependencies in properties->linker->input.
- adding libraries path in windows environment variables.
- i had not used proper additional dependencies pointed @miki , quoted him "well have link opencv_corexxx,opencv_highguixxx, opencv_imgprocxxx etc... (with trailing "d" if in debug) in linker->input--- additional dependencies"
thanks again
Comments
Post a Comment