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
QtWS25 Last Chance

how to solve the include libusb error

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 455 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 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

    JonBJ 1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2
      This post is deleted!
      JonBJ 1 Reply Last reply
      0
      • B Blackzero

        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

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #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
        1
        • JoeCFDJ JoeCFD

          This post is deleted!

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #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.

          JoeCFDJ 1 Reply Last reply
          0
          • JonBJ JonB

            @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 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?

            Christian EhrlicherC 1 Reply Last reply
            0
            • JonBJ JonB

              @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.

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by
              #6

              @JonB junk post. Ignore it.

              1 Reply Last reply
              0
              • B Blackzero

                @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?

                Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 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
                • JonBJ JonB

                  @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 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

                  • Login

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