PDA

View Full Version : QtCreator .pro file question



bryang
22nd February 2011, 17:01
I can't seem to get a library linked. The library is libusb-1.0.


I have the following line in my .pro file:
LIBS += -L/usr/local/lib -llibusb-1.0


I get the following error during a build (clean/qmake/rebuild all):
/usr/bin/ld: cannot find -llibusb-1.0


I'm sure that the library is on my system. The results of #locate libusb-1.0:

/usr/local/include/libusb-1.0
/usr/local/include/libusb-1.0/libusb.h
/usr/local/lib/libusb-1.0.a
/usr/local/lib/libusb-1.0.la
/usr/local/lib/libusb-1.0.so
/usr/local/lib/libusb-1.0.so.0
/usr/local/lib/libusb-1.0.so.0.0.0
/usr/local/lib/pkgconfig/libusb-1.0.pc


I tried changing the .pro line to all of these with no success:
LIBS += -L/usr/local/lib -llibusb-1.0.so
LIBS += -L/usr/local/lib -llibusb-1.0.so.0
LIBS += -L/usr/local/lib -llibusb-1.0.so.0.0.0



Any ideas what I'm not doing or doing incorrectly?

Thanks!

stampede
22nd February 2011, 17:27
-llibusb-1.0
I think the "lib" is not needed here, try

-lusb-1.0