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:-

  1. adding proper additional dependencies in properties->linker->input.
  2. adding libraries path in windows environment variables.
  3. 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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -