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. how to add external library on windows in qt
Forum Updated to NodeBB v4.3 + New Features

how to add external library on windows in qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 309 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.
  • C Offline
    C Offline
    Chakravarthi.N
    wrote on 30 Aug 2024, 05:49 last edited by
    #1

    Using Qt libusb32 or libusb64, I must add the libusb library on Windows. I've tried. I have included the path in the pro, but it is not functioning. I have also added the external path, but it is not working. Would you kindly advise me on how to add?
    Screenshot 2024-08-30 111910.png Screenshot 2024-08-30 111919.png

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on 30 Aug 2024, 06:40 last edited by Bonnie
      #2

      You are not using the add library wizard correctly.
      According to you current content, I suppose you should write like this:

      LIBS += -L$$PWD/../../Downloads/libusb-1.0.27/MinGW32/static -llibusb-1.0.dll 
      INCLUDEPATH += $$PWD/../../Downloads/libusb-1.0.27/include
      

      I use this MinGW32/static path because I download libusb-1.0.27.7z from github and there's libusb-1.0.dll.a file in that folder, right?
      Actually the comments in you .pro already shows you the necessary variables need to be set, you just need to change the folder path and library file name.
      And if you want to link the static library you should change -llibusb-1.0.dll to -llibusb-1.0

      C 1 Reply Last reply 31 Aug 2024, 15:29
      0
      • C Offline
        C Offline
        Chakravarthi.N
        wrote on 31 Aug 2024, 15:17 last edited by
        #3

        Screenshot 2024-08-30 112235.png

        1 Reply Last reply
        0
        • B Bonnie
          30 Aug 2024, 06:40

          You are not using the add library wizard correctly.
          According to you current content, I suppose you should write like this:

          LIBS += -L$$PWD/../../Downloads/libusb-1.0.27/MinGW32/static -llibusb-1.0.dll 
          INCLUDEPATH += $$PWD/../../Downloads/libusb-1.0.27/include
          

          I use this MinGW32/static path because I download libusb-1.0.27.7z from github and there's libusb-1.0.dll.a file in that folder, right?
          Actually the comments in you .pro already shows you the necessary variables need to be set, you just need to change the folder path and library file name.
          And if you want to link the static library you should change -llibusb-1.0.dll to -llibusb-1.0

          C Offline
          C Offline
          Chakravarthi.N
          wrote on 31 Aug 2024, 15:29 last edited by
          #4

          @Bonnie Thanks for you valuable response.

          1 Reply Last reply
          0

          1/4

          30 Aug 2024, 05:49

          • Login

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