Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to resolve library (.so) dependancy ?

Hi,

I'm using opencv3.3.1 for Linux platform in Qt framework. Having tree structure like this below

Compiler: Desktop Qt 5.9.4 MSVC2015 64bit (Microsoft Visual C++ compiler 14.0 (amd64))

.
|---- bin
|---- build
| |---- include
|----include
| |---- opencv
| |---- opencv2
|---- lib
| |---- pkgconfig
| |---- python2.7
|---- share
|---- OpenCV

I have linked all the libraries which is on the path: /lib

libopencv_calib3d.so libopencv_imgcodecs.so.4.0.0 libopencv_stitching.so.4.0 libopencv_calib3d.so.4.0 libopencv_imgproc.so libopencv_stitching.so.4.0.0 libopencv_calib3d.so.4.0.0 libopencv_imgproc.so.4.0 libopencv_superres.so libopencv_core.so libopencv_imgproc.so.4.0.0 libopencv_superres.so.4.0 libopencv_core.so.4.0 libopencv_ml.so libopencv_superres.so.4.0.0 libopencv_core.so.4.0.0 libopencv_ml.so.4.0 libopencv_videoio.so libopencv_features2d.so libopencv_ml.so.4.0.0 libopencv_videoio.so.4.0 libopencv_features2d.so.4.0 libopencv_objdetect.so libopencv_videoio.so.4.0.0 libopencv_features2d.so.4.0.0 libopencv_objdetect.so.4.0 libopencv_video.so libopencv_flann.so libopencv_objdetect.so.4.0.0 libopencv_video.so.4.0 libopencv_flann.so.4.0 libopencv_photo.so libopencv_video.so.4.0.0 libopencv_flann.so.4.0.0 libopencv_photo.so.4.0 libopencv_videostab.so libopencv_highgui.so libopencv_photo.so.4.0.0 libopencv_videostab.so.4.0 libopencv_highgui.so.4.0 libopencv_shape.so libopencv_videostab.so.4.0.0 libopencv_highgui.so.4.0.0 libopencv_shape.so.4.0 pkgconfig libopencv_imgcodecs.so libopencv_shape.so.4.0.0 python2.7 libopencv_imgcodecs.so.4.0 libopencv_stitching.so

For linking I have tried with this below,

unix|win32: LIBS += -L$${PATHOFDIR}/video -lvideo
INCLUDEPATH += $${PATHOFDIR}/video
DEPENDPATH += $${PATHOFDIR}/video

OPENCVLINUXDIR = /home/thirdparty/opencv/opencv_3.3.1

INCLUDEPATH += $${OPENCVLINUXDIR}/include
DEPENDPATH += $${OPENCVLINUXDIR}/include

LIBS += -L$${OPENCVLINUXDIR}/lib -lopencv_core -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videoio -lopencv_videostab

    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_core.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_calib3d.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_features2d.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_flann.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_highgui.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_imgcodecs.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_imgproc.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_ml.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_ml.so.4.0.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_objdetect.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_photo.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_photo.so.4.0.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_shape.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_stitching.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_superres.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_video.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_videoio.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_videostab.so.4.0

Please help me out why I'm getting this errors

Still 2 libraries I'm unable to link, say (libopencv_core.so.4.0, libopencv_videoio.so.4.0), got this below error,

:-1: warning: libopencv_core.so.4.0, needed by /home/test/UnitTest/../../build/release/modules/video/libvideo.so, not found (try using -rpath or -rpath-link) :-1: warning: libopencv_videoio.so.4.0, needed by /home/test/UnitTest/../../build/release/modules/video/libvideo.so, not found (try using -rpath or -rpath-link)

And additionally getting this below error also,

/home/thirdparty/opencv/opencv_3.3.1/include/opencv2/core/mat.inl.hpp:511: error: undefined reference to `cv::Mat::updateContinuityFlag()'

How to resolve library (.so) dependancy ?

Hi,

I'm using opencv3.3.1 for Linux platform in Qt framework. Having tree structure like this below

Compiler: Desktop Qt 5.9.4 MSVC2015 64bit (Microsoft Visual C++ compiler 14.0 (amd64))

.
|---- bin
|---- build
| |---- include
|----include
| |---- opencv
| |---- opencv2
|---- lib
| |---- pkgconfig
| |---- python2.7
|---- share
|---- OpenCV

I have linked all the libraries which is on the path: /lib

libopencv_calib3d.so libopencv_imgcodecs.so.4.0.0 libopencv_stitching.so.4.0 libopencv_calib3d.so.4.0 libopencv_imgproc.so libopencv_stitching.so.4.0.0 libopencv_calib3d.so.4.0.0 libopencv_imgproc.so.4.0 libopencv_superres.so libopencv_core.so libopencv_imgproc.so.4.0.0 libopencv_superres.so.4.0 libopencv_core.so.4.0 libopencv_ml.so libopencv_superres.so.4.0.0 libopencv_core.so.4.0.0 libopencv_ml.so.4.0 libopencv_videoio.so libopencv_features2d.so libopencv_ml.so.4.0.0 libopencv_videoio.so.4.0 libopencv_features2d.so.4.0 libopencv_objdetect.so libopencv_videoio.so.4.0.0 libopencv_features2d.so.4.0.0 libopencv_objdetect.so.4.0 libopencv_video.so libopencv_flann.so libopencv_objdetect.so.4.0.0 libopencv_video.so.4.0 libopencv_flann.so.4.0 libopencv_photo.so libopencv_video.so.4.0.0 libopencv_flann.so.4.0.0 libopencv_photo.so.4.0 libopencv_videostab.so libopencv_highgui.so libopencv_photo.so.4.0.0 libopencv_videostab.so.4.0 libopencv_highgui.so.4.0 libopencv_shape.so libopencv_videostab.so.4.0.0 libopencv_highgui.so.4.0.0 libopencv_shape.so.4.0 pkgconfig libopencv_imgcodecs.so libopencv_shape.so.4.0.0 python2.7 libopencv_imgcodecs.so.4.0 libopencv_stitching.so

For linking I have tried with this below,

unix|win32: LIBS += -L$${PATHOFDIR}/video -lvideo
INCLUDEPATH += $${PATHOFDIR}/video
DEPENDPATH += $${PATHOFDIR}/video

OPENCVLINUXDIR = /home/thirdparty/opencv/opencv_3.3.1

INCLUDEPATH += $${OPENCVLINUXDIR}/include
DEPENDPATH += $${OPENCVLINUXDIR}/include

LIBS += -L$${OPENCVLINUXDIR}/lib -lopencv_core -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videoio -lopencv_videostab

    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_core.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_calib3d.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_features2d.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_flann.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_highgui.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_imgcodecs.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_imgproc.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_ml.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_ml.so.4.0.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_objdetect.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_photo.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_photo.so.4.0.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_shape.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_stitching.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_superres.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_video.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_videoio.so.4.0
    dependencies.files += $${OPENCVLINUXDIR}/lib/libopencv_videostab.so.4.0

Please help me out why I'm getting this errors

Still 2 libraries I'm unable to link, say (libopencv_core.so.4.0, libopencv_videoio.so.4.0), got this below error,

:-1: warning: libopencv_core.so.4.0, needed by /home/test/UnitTest/../../build/release/modules/video/libvideo.so, not found (try using -rpath or -rpath-link) :-1: warning: libopencv_videoio.so.4.0, needed by /home/test/UnitTest/../../build/release/modules/video/libvideo.so, not found (try using -rpath or -rpath-link)

And additionally getting this below error also,

/home/thirdparty/opencv/opencv_3.3.1/include/opencv2/core/mat.inl.hpp:511: error: undefined reference to `cv::Mat::updateContinuityFlag()'

Check the link for details explanation: https://www.qtcentre.org/threads/70067-How-to-resolve-library-(-so)-dependancy