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. Library linking problem with openCV
QtWS25 Last Chance

Library linking problem with openCV

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 460 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.
  • S Offline
    S Offline
    Shane00
    wrote on last edited by
    #1

    I am trying to run a sample code from OpenCV to ensure my library is linked properly. However, i am unable to find the dll or dll.a files when i right click on the project folder to add libraries., although they exist.
    pic1.png

    However, if i manually add libraries for my .pro file as shown, the project is able to build and run properly through the IDE.
    pic2.png

    Even so, i am unable to run the executable file directly without the ide with this error as shown.
    pic3.png

    Can someone tell me what is going on here? I have no clue. I guess i am using a static library with the .a files so why can't i run the executable file without running into run time error?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      Programming basic: you need the dlls with the exe or in you PATH.
      If you run from the IDE, it will set the PATH for you (from the LIBS).
      And no, you are not linking static library, if yes they won't be called "*.dll.a".
      About the first picture, I think you've clicked the wrong button, because it seems to want a folder, not files.

      S 1 Reply Last reply
      0
      • B Bonnie

        Programming basic: you need the dlls with the exe or in you PATH.
        If you run from the IDE, it will set the PATH for you (from the LIBS).
        And no, you are not linking static library, if yes they won't be called "*.dll.a".
        About the first picture, I think you've clicked the wrong button, because it seems to want a folder, not files.

        S Offline
        S Offline
        Shane00
        wrote on last edited by
        #3

        @Bonnie So dll.a files are considered dynamic? I have a binary folder with dll files & exe files. Also i have a lib folder with dll.a files. Which one should i include?

        B 1 Reply Last reply
        0
        • S Shane00

          @Bonnie So dll.a files are considered dynamic? I have a binary folder with dll files & exe files. Also i have a lib folder with dll.a files. Which one should i include?

          B Offline
          B Offline
          Bonnie
          wrote on last edited by Bonnie
          #4

          @Shane00
          .a files are just like .lib files, it might be a static library, or it might be used to import a dynamic-link library.
          From its name you can see it is the latter.
          So you need to link the .dll.a files in the .pro file to create your exe file and when running the program you need .dll files.
          And what you need to "include" are the header files.

          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