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. OpenCV build problem
Qt 6.11 is out! See what's new in the release blog

OpenCV build problem

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 676 Views 1 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.
  • H Offline
    H Offline
    HB76
    wrote on last edited by
    #1

    Hello everyone !

    I'm trying to build opencv 4.3.0 on an other computer but I am facing some problems.

    The install went perfectly without errors and after all nstallation, I've got this setup in my C:\ folder :

    C:\opencv\

    · .cache\

    · 3rdparty\

    · apps\

    · cmake\

    · data\

    · doc\

    · include\

    o opencv2\

    § opencv.hpp

    · modules\

    · platforms\

    · samples\

    C:\opencv-build\

    · 3rdparty\

    · apps\

    · bin\

    · CMakeFiles\

    · configured\

    · data\

    · doc\

    · include\

    · install\

          o    etc\
    
          o    include\
    
                              ·         opencv2\
    
                    ·     calib3d\
    
                    ·     core\
    
                    ·     dnn\
    
                    ·     features2d\
    
                    ·     flann\
    
                    ·     highgui\
    
                    ·     imgcodecs\
    
                    ·     imgproc\
    
                    ·     ml\
    
                    ·     objdetect\
    
                    ·     photo\
    
                    ·     stitching\
    
                    ·     video\
    
                    ·     videoio\
    
          o    x64\
    

    · lib\

    · modules\

    · opencv2\

    · python_loader\

    · test-reports\

    · tmp\

    · win-install\

    The first strange thing is that I don't have all cpp files in my include folder under C:\opencv
    So I tried to change the .pro file to this to find the good hpp files :

    INCLUDEPATH += C:\opencv-build\install\include\
    
     
    
    LIBS += C:\opencv-build\bin\libopencv_core430.dll
    
    LIBS += C:\opencv-build\bin\libopencv_highgui430.dll
    
    LIBS += C:\opencv-build\bin\libopencv_imgcodecs430.dll
    
    LIBS += C:\opencv-build\bin\libopencv_imgproc430.dll
    
    LIBS += C:\opencv-build\bin\libopencv_features2d430.dll
    
    LIBS += C:\opencv-build\bin\libopencv_calib3d430.dll
    

    But when I compile my code, everything works perfectly until the program start and crash immediatly.

    Do you know what did I do wrong ?

    Thanks !

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

      Hi,

      The likely issue is that the OpenCV .dlls are not found. Go to the Run part of the Project Panel and change the PATH environment variable to also contain "C:\opencv-build\bin".

      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
      1
      • H Offline
        H Offline
        HB76
        wrote on last edited by
        #3

        Hi,

        In facts the problem solved itself for no reason (maybe because I restarted the computer).
        Thanks for your help !

        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