Freshly installed Ubuntu 18 and OpenCV C++ (version 3.4.10)
Attempt to compile decolor.cpp from the installed samples using:
g++ -std=c++11 decolor.cpp -o fish -I /home/a/Downloads/installation/OpenCV-3.4/include -L /home/a/Downloads/installation/OpenCV-3.4/lib -lopencv_core -lopencv_highgui
aborts with the error:
/usr/bin/ld: /tmp/ccN7bflL.o: undefined reference to symbol '_ZN2cv6imreadERKNS_6StringEi'
//home/a/Downloads/installation/OpenCV-3.4/lib/libopencv_imgcodecs.so.3.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I would not ask about symbol '_ZN2cv6imreadERKNS_6StringEi' gobbledegook. But what is DSO and what it has to do with the command line?
Google brings suggestions that this is because I might have two versions of openCV installed and should uninstall one.
I installed openCV using .sh script downloaded from
www.learnopencv.com/install-opencv-3-4-4-on-ubuntu-18-04/
Is there in this code anything which could cause installation of libraries belonging to different openCV versions?
Installation went with no errors
pkg-config --modversion opencv returns: 3.4.10
If indeed I have two openCV how shall I uninstall one of them as suggested?