[uClinux-dev] linking probs...

Vivekanandarajah Kugan mail2kugan at lycos.com
Mon Apr 8 23:40:26 EDT 2002


Hi
Is the bluettoth lib is also in /usr/local/m68k-elf/lib , other wise you will have to specify that also by -L$(BLUETOOTH_LIB_PATH) as well

where BLUETOOTH_LIB_PATH is the path of your bluetooth libraries

if you have the libraries in local direcetory use -L./
i.e.
m68k-elf-gcc -o conftest -Wall -g -O2 -I../bluez-libs-2.0-pre8/include -L/usr/local/m68k-elf/lib -L./ conftest.c -lc -lbluetooth 
Regards
Kugan
--

On Mon, 8 Apr 2002 23:11:56   
 Joseph Von Tersch wrote:
>Hi, 
>
>I'm trying to build the bluez tools... I can't seem to get libbluetooth to 
>link.  I built it aready and it seems to be ok, doing:
>
>nm libbluetooth.a 
>
>gives:
>
>000002ee T hci_lmtostr
>00000a44 T hci_local_name
>000002be T hci_lptostr
>00000586 T hci_open_dev
>0000028e T hci_ptypetostr
>00000cae T hci_read_local_version
>00000b60 T hci_read_remote_features
>00000c02 T hci_read_remote_version
>00000ab2 T hci_remote_name
>00000608 T hci_send_cmd
>etc.... etc.....
>
>
>with gcc I do:
>
>m68k-elf-gcc -o conftest -Wall -g -O2 -I../bluez-libs-2.0-pre8/include 
>-L/usr/local/m68k-elf/lib -lbluetooth conftest.c -lc
>
>and get this error:
>
>/tmp/cceK2OmO.o: In function `main':
>/usr/src/bt/bluez-utils-2.0-pre8/conftest.c:8: undefined reference to 
>`hci_open_dev'
>collect2: ld returned 1 exit status
>
>conftest.c has:
>#include "confdefs.h"
>/* Override any gcc2 internal prototype to avoid an error.  */
>/* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply.  */
>    char hci_open_dev();
>
>    int main() {
>    hci_open_dev()
>    ; return 0; }
>
>it's what's done by the configure program.
>
>i've done ranlib, I've tried changing the order of the libraries, I've 
>checked my paths, i've even put the libraries in the local dir of that 
>conftest.c file....I HAVE NO IDEA why it's still not linking properly!!
>it's driving me insane.   I can't get past the configure part because it 
>fails with the link.
>
>Thanks,
>Joseph
>This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/
>


See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp 
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list