shared libraries conflict
OpenCV.3.4.10 on Ubuntu 18.04
To use findTransformECC I had to install libopencv_video.so.3.4.10 As a result all my other cpp, which worked well with the libraries mentioned below, now compile with warning:
/usr/bin/ld: warning: libopencv_imgproc.so.3.4, needed by /OpenCV-3.4/lib/libopencv_highgui.so, may conflict with libopencv_imgproc.so.3.2
/usr/bin/ld: warning: libopencv_core.so.3.4, needed by /OpenCV-3.4/lib/libopencv_highgui.so, may conflict with libopencv_core.so.3.2
Running the compiled file aborts saying:
error loading shared libraries: libopencv_highgui.so.3.4: cannot open shared object file: No such file or directory
In my /OpenCV-3.4/lib/ I have all these .so files in three versions so, so.3.4 and so.3.4.10 but no so.3.2
Can someone explain what is going on and how to fix it?
You'll be better to upgrade to OpenCV 4
More details. Though there is no libopencv_core.so.3.2 in my installation/OpenCV-3.4/lib, file search found it in /lib/x86_64-linux-gnu. By the time-stamp it was created exactly after (and probably as a result of) installation of libopencv-video-dev.
returned 12 pathes, /lib/x86_64-linux-gnu being the second one.
My compile script in a makefile:
It looks like ld takes all these shared libraries from my installation/OpenCV-3.4/lib. But ignores libopencv_core.so, libopencv_core.so.3.4 and libopencv_core.so.3.4.10 sitting here. It goes to /lib/x86_64-linux-gnu and picks up libopencv_core.so.3.2 which conflicts with libopencv_core.so.3.4 demanded by libopencv_highgui.so
Why this strated happening after installing libopencv-video-dev and how to fix it?