Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Opencv libs are not found - HELP
QtWS25 Last Chance

Opencv libs are not found - HELP

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 3 Posters 4.3k Views
  • 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.
  • J Offline
    J Offline
    jeylb
    wrote on last edited by
    #1

    Hey,
    i want to use the opencv libs.
    this is a part of my .pro file :
    INCLUDEPATH += "D:\OpenCV\debug\include"
    LIBS += "D:\OpenCV\debug\lib*.dll.a"

    when compiling the project no error occurs but starting the .exe throws "cannot find *.dll".
    but starting the project in qt creator opens cmd waiting for a key to terminate the process with return value 0.
    when i do not include the libs and include paths many errors occure while compiling the project : "undefined reference" to the opencv functions.
    so it seems as qt finds the libs but although it does not work.
    my path : C:\QtSDK\mingw\bin; C:\QtSDK\QtCreator\bin; C:\OpenCV\debug\bin; C:\OpenCV\debug\include; C:\OpenCV\debug\lib.
    in C:\OpenCV\debug\ the libs end with .dll.a.
    i tried backslashes instead of forward slashes, to include without quotes and i moved the libs from D: to C: and back, started the Qt creator and the exe as admin but it does not change the behaviour of the project/.exe.
    my fellow student has exactly the same OS (Windows 7 64 bit) the same folders where openCV is found and the same PATH and on his destkop it works.
    GREETZ

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Qt finds the libraries for linking (.a or .lib) but when you double click .exe, it requires the to be available in system path or in the same directory as the executable.

      Also, for LIBS variable, I think you should specify all libraries explicitly by name.

      (Z(:^

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        welcome to devnet

        You should stick with forward slashes for Qt and in this case qmake. AFAIK you have to reference each used lib independently and cannot use wild cards there.
        Any way if your fellow student has the exact same configuration and .pro file it should work the same way. Check the pro files and also if the lib names are identical in both configurations.
        If this is the case run qmake again on your project.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jeylb
          wrote on last edited by
          #4

          but running the process in qt creator does not give the expected result. the process terminates without open the webcam or image that it should do and do on my fellow students pc. and he uses the same way to embedd the libs

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jeylb
            wrote on last edited by
            #5

            but how can i embedd more than one library independently, i tried it so many ways but the .exe only finds the first library in try to include. i tried it with -L and backslashes at the end of each line to use multiply lines...we try to solve this problem since 4 hours ..

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jeylb
              wrote on last edited by
              #6

              solved the problem. i just reinstalled qt creator and now it works ...

              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