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 solve the include libusb error
Forum Updated to NodeBB v4.3 + New Features

how to solve the include libusb error

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 582 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.
  • B Offline
    B Offline
    Blackzero
    wrote on 4 Jul 2024, 16:41 last edited by
    #1

    how do I solve this error, even though the folder is correct
    Screenshot 2024-07-04 234016.jpg Screenshot 2024-07-04 234031.jpg Screenshot 2024-07-04 234058.jpg

    J 1 Reply Last reply 4 Jul 2024, 17:39
    0
    • J Offline
      J Offline
      JoeCFD
      wrote on 4 Jul 2024, 17:35 last edited by
      #2
      This post is deleted!
      J 1 Reply Last reply 4 Jul 2024, 17:40
      0
      • B Blackzero
        4 Jul 2024, 16:41

        how do I solve this error, even though the folder is correct
        Screenshot 2024-07-04 234016.jpg Screenshot 2024-07-04 234031.jpg Screenshot 2024-07-04 234058.jpg

        J Offline
        J Offline
        JonB
        wrote on 4 Jul 2024, 17:39 last edited by JonB 7 Apr 2024, 17:47
        #3

        @Blackzero
        If you are showing file libusb-1.0.def, that does not supply a library. Since you seem (from your LIBS line) to be using MinGW (are you? why not say?) it will be looking for something like libusb-1.0.a. Maybe you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib), I don't know?

        B 2 Replies Last reply 4 Jul 2024, 17:59
        1
        • J JoeCFD
          4 Jul 2024, 17:35

          This post is deleted!

          J Offline
          J Offline
          JonB
          wrote on 4 Jul 2024, 17:40 last edited by JonB 7 Apr 2024, 17:44
          #4

          @JoeCFD said in how to solve the include libusb error:

          I guess you need dll file

          Since when can you link against a DLL? Unless a .def MSVC magic lets you do that? But OP is using MinGW anyway.

          J 1 Reply Last reply 4 Jul 2024, 18:00
          0
          • J JonB
            4 Jul 2024, 17:39

            @Blackzero
            If you are showing file libusb-1.0.def, that does not supply a library. Since you seem (from your LIBS line) to be using MinGW (are you? why not say?) it will be looking for something like libusb-1.0.a. Maybe you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib), I don't know?

            B Offline
            B Offline
            Blackzero
            wrote on 4 Jul 2024, 17:59 last edited by
            #5

            @JonB said in how to solve the include libusb error:

            If you are showing file libusb-1.0.def, that does not supply a library. Since you seem (from your LIBS line) to be using MinGW (are you? why not say?) it will be looking for something like libusb-1.0.a. Maybe you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib), I don't know?

            Yes I'm using MinGw64, so how do I set it up for mingw?

            C 1 Reply Last reply 4 Jul 2024, 18:06
            0
            • J JonB
              4 Jul 2024, 17:40

              @JoeCFD said in how to solve the include libusb error:

              I guess you need dll file

              Since when can you link against a DLL? Unless a .def MSVC magic lets you do that? But OP is using MinGW anyway.

              J Offline
              J Offline
              JoeCFD
              wrote on 4 Jul 2024, 18:00 last edited by
              #6

              @JonB junk post. Ignore it.

              1 Reply Last reply
              0
              • B Blackzero
                4 Jul 2024, 17:59

                @JonB said in how to solve the include libusb error:

                If you are showing file libusb-1.0.def, that does not supply a library. Since you seem (from your LIBS line) to be using MinGW (are you? why not say?) it will be looking for something like libusb-1.0.a. Maybe you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib), I don't know?

                Yes I'm using MinGw64, so how do I set it up for mingw?

                C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 4 Jul 2024, 18:06 last edited by
                #7

                @Blackzero said in how to solve the include libusb error:

                so how do I set it up for mingw?

                you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib),

                You already quoted the answer...

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • J JonB
                  4 Jul 2024, 17:39

                  @Blackzero
                  If you are showing file libusb-1.0.def, that does not supply a library. Since you seem (from your LIBS line) to be using MinGW (are you? why not say?) it will be looking for something like libusb-1.0.a. Maybe you need to change the -L option to append the right directory for your compiler/linker (like MinGW64/lib), I don't know?

                  B Offline
                  B Offline
                  Blackzero
                  wrote on 5 Jul 2024, 12:54 last edited by
                  #8

                  @JonB Yes you are right, I changed it to this and put libusb-1.0.dll near the application, thanks

                  INCLUDEPATH += C:/libusb-1.0.27/include
                  LIBS += -LC:/libusb-1.0.27/MinGW64/static -lusb-1.0
                  
                  1 Reply Last reply
                  1
                  • B Blackzero has marked this topic as solved on 7 Jul 2024, 13:00

                  1/8

                  4 Jul 2024, 16:41

                  • Login

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