Linking issue with libusb-1.0
-
Hi,
I got problem with libusb-1.0:
I got following configuration in my pro file:
unix:!macx|win32: LIBS += -L$$PWD/Scale/lib/ -llibusb-1.0
INCLUDEPATH += $$PWD/Scale/inc
DEPENDPATH += $$PWD/Scale/incBut during build I get linking issue:
error: undefined reference to `libusb_init'error: undefined reference to `libusb_kernel_driver_active'
an so on..
I would be grateful for any hints.
-
-
@Kaluss
Need to know whether you are using MSVC or MinGW then? If MinGW then as per Linux.However the error message may indicate that the
.lib
/.a
library file was indeed found, but did not resolve the specified symbols. I have no idea whether this is supposed to be needed under Windows. -
-
@JonB when I change to: -lusb-1.0
I got:
error: skipping incompatible ...\Scale\lib/libusb-1.0.a when searching for -lusb-1.0
error: skipping incompatible ...\Scale\lib\libusb-1.0.a when searching for -lusb-1.0
error: skipping incompatible ...\Scale\lib/libusb-1.0.a when searching for -lusb-1.0
error: cannot find -lusb-1.0
error: skipping incompatible ...\Scale\lib/libusb-1.0.a when searching for -lusb-1.0
error: collect2.exe: error: ld returned 1 exit status -
@Kaluss said in Linking issue with libusb-1.0:
...\Scale\lib/libusb-1.0.a
This is static library. Do you also have dynamic one (.so)?
-
@Kaluss said in Linking issue with libusb-1.0:
error: skipping incompatible ...\Scale\lib/libusb-1.0.a when searching for -lusb-1.0
In addition to @jsulm. As you can see it has now found a matching
libusb-1.0.a
file and is rejecting it because it is "incompatible". Which is doubtless why you get "unresolved references". Different compiler? Different 32- vs 64-bitedness? Old version requiring a newer one? -