I have installed opencv 2.4.10, but i am unable to include opencv. header files.I'm getting "undefined reference to `cv::'".Can any one help?

asked 2015-01-11 00:16:43 -0600

updated 2015-01-11 06:03:34 -0600

sample.c:(.text+0x92): undefined reference to `cv::imread(std::string const&, int)'
sample.c:(.text+0x12a): undefined reference to `cv::namedWindow(std::string const&, int)'
sample.c:(.text+0x15b): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
sample.c:(.text+0x19b): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
sample.c:(.text+0x1c3): undefined reference to `cv::waitKey(int)'
edit retag flag offensive close merge delete

Comments

2

those are linker errors, not related to opencv headers.

you probably forgot to link opencv libs like opencv_core and opencv_highgui

berak gravatar imageberak ( 2015-01-11 02:19:50 -0600 )edit