Quote:
Originally Posted by
Corona688
The .so file is not enough, you need the .a file to link.
I'd expect the .so to be part of libusb, not libusb-devel. Make sure you have both installed.
Where would I look to make sure that the .a file is where it is supposed to be?
I have the following installed for usb,
libusb-0_1-4 - libusb-1.0 Compatibility Library for libusb-0.1
/usr/lib64/libusb-0.1.so.4
/usr/lib64/libusb-0.1.so.4.4.4
/usr/share/doc/packages/libusb-0_1-4
/usr/share/doc/packages/libusb-0_1-4/AUTHORS
/usr/share/doc/packages/libusb-0_1-4/COPYING
/usr/share/doc/packages/libusb-0_1-4/ChangeLog
/usr/share/doc/packages/libusb-0_1-4/LICENSE
/usr/share/doc/packages/libusb-0_1-4/NEWS
/usr/share/doc/packages/libusb-0_1-4/README
libusb-1_0-0 - USB Library
/usr/lib64/libusb-1.0.so.0
/usr/lib64/libusb-1.0.so.0.1.0
/usr/share/doc/packages/libusb-1_0-0
/usr/share/doc/packages/libusb-1_0-0/AUTHORS
/usr/share/doc/packages/libusb-1_0-0/COPYING
/usr/share/doc/packages/libusb-1_0-0/NEWS
/usr/share/doc/packages/libusb-1_0-0/README
/usr/share/doc/packages/libusb-1_0-0/THANKS
/usr/share/doc/packages/libusb-1_0-0/TODO
libusb-1_0-devel - USB Library
/usr/include/libusb-1.0
/usr/include/libusb-1.0/libusb.h
/usr/lib64/libusb-1.0.so
/usr/lib64/pkgconfig/libusb-1.0.pc
/usr/share/doc/packages/libusb-1_0-devel
/usr/share/doc/packages/libusb-1_0-devel/PORTING
libusbmuxd2 - A library to abstract socket/protocol communication to the usbmuxd daemon
/usr/lib64/libusbmuxd.so.1.0.8
/usr/lib64/libusbmuxd.so.2
If I change my link line to,
$(BDIR)/suse_test_app: $(OBJSS)
$(CC++) $(OPTIMIZE) -o $@ $(FCFLAGS) $(OBJSS) -lusb-1.0 -lpthread
I can get the app to link. There is a segfault at runtime, so I don't know if the above is linking to the proper library or not. I just assumed that -lusb was referring to a devel element, but I guess it makes more sense that it would be a runtime element, since users wouldn't have the devel library installed.
LMHmedchem