c++ - unresolved symbol for opencv error -


i've spent last 2 days trying opencv work. im using visual studio 2015 community , opencv 3.1.0. i've added lib files , dlls , configured properties project. insight great have no clue how fix this.

#include <opencv2\opencv.hpp>  using namespace cv;  int main() {     namedwindow("win");     waitkey(0);     return 1; }     

the code above throws following error.

lnk2019 unresolved external symbol "void __cdecl cv::namedwindow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?namedwindow@cv@@yaxaebv?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@h@z) referenced in function main opencv

namedwindow belongs highgui library. try adding

#include<opencv2\highgui.hpp> 

and link corresponding library.

also, namedwindow has 2 arguments: "windowname" , cv_window_type, latter can be:

cv_window_autosize cv_window_normal 

and other options


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -