how to solve the include libusb error
-
wrote on 4 Jul 2024, 16:41 last edited by
-
wrote on 4 Jul 2024, 17:35 last edited byThis post is deleted!
-
wrote on 4 Jul 2024, 17:39 last edited by JonB 7 Apr 2024, 17:47
@Blackzero
If you are showing filelibusb-1.0.def
, that does not supply a library. Since you seem (from yourLIBS
line) to be using MinGW (are you? why not say?) it will be looking for something likelibusb-1.0.a
. Maybe you need to change the-L
option to append the right directory for your compiler/linker (likeMinGW64/lib
), I don't know? -
wrote on 4 Jul 2024, 17:40 last edited by JonB 7 Apr 2024, 17:44
@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. -
@Blackzero
If you are showing filelibusb-1.0.def
, that does not supply a library. Since you seem (from yourLIBS
line) to be using MinGW (are you? why not say?) it will be looking for something likelibusb-1.0.a
. Maybe you need to change the-L
option to append the right directory for your compiler/linker (likeMinGW64/lib
), I don't know?wrote on 4 Jul 2024, 17:59 last edited by@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?
-
@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. -
@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?
@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...
-
@Blackzero
If you are showing filelibusb-1.0.def
, that does not supply a library. Since you seem (from yourLIBS
line) to be using MinGW (are you? why not say?) it will be looking for something likelibusb-1.0.a
. Maybe you need to change the-L
option to append the right directory for your compiler/linker (likeMinGW64/lib
), I don't know? -
1/8