OpenCV-3.4/lib vs opencv/build/lib

asked 2020-04-24 08:22:30 -0600

andrei186 gravatar image

updated 2020-04-24 08:24:05 -0600

after installing openCV 3.4.10 I've got two lib directories:

Installation/OpenCV-3.4/lib

and

Installation/opencv/build/lib

They contain .so files with the same names.

What is the purpose of these two directories?

The .os files with the same names - are they the same?

edit retag flag offensive close merge delete

Comments

opencv will install required libs / headers to whatever CMAKE_INSTALL_PREFIX is set to (/usr/local by default on linux) and that's what you should use. (it's not mandatory to keep the src tree)

after installing openCV 3.4.10

what did you do, exactly ? also: os ?

berak gravatar imageberak ( 2020-04-24 08:38:26 -0600 )edit

I unstalled OpenCV on Ununty 18.04 using .sh script from here: www.learnopencv.com/install-opencv-4-...

In particular:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
        -D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-"$cvVersion" \
        -D INSTALL_C_EXAMPLES=ON \
        -D INSTALL_PYTHON_EXAMPLES=ON \
        -D WITH_TBB=ON \
        -D WITH_V4L=ON \
        -D OPENCV_PYTHON3_INSTALL_PATH=$cwd/OpenCV-$cvVersion-py3/lib/python3.6/site-  packages \
    -D WITH_QT=ON \
    -D WITH_OPENGL=ON \
    -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
    -D BUILD_EXAMPLES=ON ..
andrei186 gravatar imageandrei186 ( 2020-04-24 10:11:34 -0600 )edit

From your comment I understand that for linking I should use Installation/OpenCV-3.4/lib which I do and it works fine, except sometimes the linker cannot find certain .os filed although they are there in that directory.

For example at the moment I have error "cannot find -lopencv_video" although I have three virsions of it: libopencv_video.sh , libopencv_video.sh.3.4 and libopencv_video.sh.3.4.10

I have asked this question in another thread, but here I am interested what is Installation/opencv/build/lib for, are the .so files there same as in Installation/OpenCV-3.4/lib.

andrei186 gravatar imageandrei186 ( 2020-04-24 10:18:51 -0600 )edit