Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with OpenCV after updates to 4.0.1

Problem with OpenCV after updates to 4.0.1

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 592 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • shavS Offline
    shavS Offline
    shav
    wrote on last edited by
    #1

    Hi everyone!

    I'm updated the OpenCV on my Mac with brew to 4.0.1 version and now when I'm build my project I'm receiving this error:

    Library not loaded: /usr/local/opt/opencv/lib/libopencv_stitching.3.4.dylib
      Referenced from: /Volumes/HPDD/Applications/Qt/Qt5.x/5.12.0/clang_64/qml/ShavComponents/libShavComponents_debug.dylib
      Reason: image not found)
    

    When I saw this error in first time I'm checked the path and didn't find the library and this is correct because I'm updated OpenCV to 4.0.1. My question is how I can set version of OpenCV if my integration in pro file looks like this:

    QT_CONFIG -= no-pkg-config
    CONFIG += link_pkgconfig
    PKGCONFIG += opencv4
    INCLUDEPATH += /usr/local/Cellar/opencv/4.0.1/include/
    

    By the way, my project is building correctly but can not start because library which my application trying load doesn't exists. How I can fix this?

    Mac OS and iOS Developer

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Try adding the DYLD_LIBRARY_PATH environment variable to the Run part of the Project panel.
      Put /usr/local/opt/opencv/lib/ as its value.

      You can also run otool -L /usr/local/opt/opencv/lib/libopencv_stitching.3.4.dylib and compare the output of the same call to the equivalent library of OpenCV 3.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • shavS Offline
        shavS Offline
        shav
        wrote on last edited by
        #3

        Thank you @SGaist! Your solution is works for me!

        Mac OS and iOS Developer

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved