c++ - How to build simple OpenCV program -


i trying build program @ http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html after installing opencv on machine. try compile using g++ display_image.cpp -o displayimage following error:

display_image.cpp:(.text+0x9d): undefined reference `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' 

i think has how i'm compiling program (some unresolved reference opencv2) don't know how resolve it. i'm using ubuntu 13.04. thanks!

edit: realize similar opencv 2.3 compiling issue - undefined refence - ubuntu 11.10 don't understand use of pkg-config opencv --cflags --libs , how avoid

you got linker error because didn't specify opencv on gcc command line

follow tutorial (http://opencv.willowgarage.com/wiki/compileopencvusinglinux) link sample opencv


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -