Running Fedora 15-64 bit on HP Elitebook 8530p.
When executing make, I get the following message:
Code:
/usr/bin/ld: cannot find -l/lib64/libusb-1.0.so.0
/usr/bin/ld: cannot find -l/usr/lib64/libbluetooth.so.3
collect2: ld returned 1 exit status
However it seems, files do exist in the folder:
Code:
[root@localhost lib64]# ls -l /usr/lib64/libbluetooth*
lrwxrwxrwx 1 root root 22 Oct 7 12:31 /usr/lib64/libbluetooth.so -> libbluetooth.so.3.10.3
lrwxrwxrwx 1 root root 22 Sep 7 12:04 /usr/lib64/libbluetooth.so.3 -> libbluetooth.so.3.10.3
-rwxr-xr-x 1 root root 111520 Jun 28 10:20 /usr/lib64/libbluetooth.so.3.10.3
Code:
[root@localhost lib64]# ls -l /lib64/libusb*
lrwxrwxrwx 1 root root 19 Sep 7 12:04 /lib64/libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rwxr-xr-x 1 root root 20376 Jun 22 03:09 /lib64/libusb-0.1.so.4.4.4
-rw-r--r-- 1 root root 85498 Feb 8 2011 /lib64/libusb-1.0.a
lrwxrwxrwx 1 root root 19 Oct 7 11:21 /lib64/libusb-1.0.so -> libusb-1.0.so.0.0.0
lrwxrwxrwx. 1 root root 19 May 13 14:42 /lib64/libusb-1.0.so.0 -> libusb-1.0.so.0.0.0
-rwxr-xr-x 1 root root 56280 Feb 8 2011 /lib64/libusb-1.0.so.0.0.0
-rw-r--r-- 1 root root 19362 Jun 22 03:09 /lib64/libusb.a
lrwxrwxrwx 1 root root 19 Oct 7 11:21 /lib64/libusb.so -> libusb-0.1.so.4.4.4
Comparing ldd results for two different packages. First one fails, latter succeeds:
Code:
[root@localhost Linux]# ldd testBluetooth
linux-gate.so.1 => (0x00a8f000)
libusb-1.0.so.0 => not found
libbluetooth.so.3 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x001eb000)
libm.so.6 => /lib/libm.so.6 (0x4d635000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4bda2000)
libc.so.6 => /lib/libc.so.6 (0x4d301000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4d5bc000)
/lib/ld-linux.so.2 (0x4d2e0000)
Code:
[root@localhost Linux]# ldd /usr/bin/nxtrc
linux-vdso.so.1 => (0x00007fff20be5000)
libbluetooth.so.3 => /usr/lib64/libbluetooth.so.3 (0x0000003aa9000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003aa7800000)
/lib64/ld-linux-x86-64.so.2 (0x0000003aa7400000)
Here are the relevant parts of the make file:
Code:
CC = g++
CFLAGS = -c -Wall -m64 #-g
BLIB = -l/usr/lib64/llibbluetooth.so.3
ULIB = -l/lib64/libusb-1.0.so.0
INCBLUE = -I/usr/include/bluetooth/
INCUSB = -I-l/usr/include/libusb-1.0/
testUsb: testUsb.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o
$(CC) $(ULIB) $(BLIB) $(INCBLUE) $(INCUSB) testUsb.cpp f1.o f2.o f3.of4.o f5.o f6.o f7.o f8.o f9.o -o testUsb -Wall
testBluetooth: testBluetooth.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o
$(CC) $(ULIB) $(BLIB) $(INCBLUE) $(INCUSB) testBluetooth.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o -o testBluetooth -Wall
Reference for CFLAGS
Thanks.