Error - OpenCV 3.0 using eclipse cdt

asked 2015-05-24 22:15:37 -0500

kj gravatar image

I am totally new to opencv and ubuntu. I tried to run the following code

include < opencv2/opencv.hpp>

int main( int argc, char** argv ) { cv::Mat img = cv::imread(argv[1], -1); if( img.empty() ) return -1; cv::namedWindow( "Example1", cv::WINDOW_AUTOSIZE ); cv::imshow( "Example1", img ); cv::waitKey( 0 ); cv::destroyWindow( "Example1" ); }

I got this error

/usr/bin/ld: ./src/qrr.o: undefined reference to symbol '_ZN2cv6imreadERKNS_6StringEi' //usr/local/lib/libopencv_imgcodecs.so.3.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: * [qrr] Error 1

I added all includes the added libraries to eclipse. Still I get the error

edit retag flag offensive close merge delete

Comments

-lopencv_imgcodecs

berak gravatar imageberak ( 2015-05-25 00:20:39 -0500 )edit