I am working through installing OpenCV on Ubuntu 15.10 following the OpenCV Tutorial at
http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html
and I am running into include and library linking errors. For the include errors, I find that I need to explicitly include from the opencv2 directories. But, the problem arises that I cannot link. Please take a look at the screenshots of the link error and of the project properties window. Any help would be greatly appreciated.
In case you can't read the link error in the screenshot, it is:
02:10:26 **** Incremental Build of configuration Release for project DisplayImage ****
make all
Building target: DisplayImage
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o "DisplayImage" ./src/DisplayImage.o -lopencv_core -lopencv_imgproc -lopencv_highgui
/usr/bin/ld: ./src/DisplayImage.o: undefined reference to symbol '_ZN2cv6imreadERKNS_6StringEi'
makefile:45: recipe for target 'DisplayImage' failed
/usr/local/lib/libopencv_imgcodecs.so.3.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [DisplayImage] Error 1
02:10:26 Build Finished (took 114ms)


UPDATE: (Answer, but I cannot submit my own answer yet. Here are the two screenshots of what the source code should look like and what the library settings should be. )



↧