<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Everyone,<br><br>&nbsp;&nbsp;&nbsp; I had a compilation problem with my bluetooth application. In my source code bluez.c, function hci_get_route, hic_open_dev, etc., are called.&nbsp; I already installed the bluetooth stack to the toolchain. I check that /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib has the libbluetooth static and shared objects, and  /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include has all the required header files, such as hci.h, hci_lib.h, bluetooth.h. By the way, I already add "-lbluetooth" to the projectdir/src/Makefile.am" (openmoko_sample_LDADD = @DEPENDENCIES_LIBS@ -lbluetooth). om-config runs well, and I check the resulted projectdir/src/Makefile,&nbsp; the bluetooth library is already added into this file (openmoko_sample_LDADD = -lmokoui2 -lgtk-x11-2.0 -lgdk-x11-2.0 .....
 -lbluetooth)<br><br>&nbsp;&nbsp;&nbsp; However, when I run "make" command under the projectdir.&nbsp; I run into some errors (link errors), the compilation is correct since I saw the corresponding object (bluez.o) file is generated, and I use "nm bluez.o" to check the external symbols, and find those called functions are there.&nbsp; By the way, "nm libbluetooth.so" lists those functions as well.&nbsp; <br><br>&nbsp;&nbsp;&nbsp; The error prompts is like:<br>&nbsp;&nbsp;&nbsp; bluez.o: in function main:<br>&nbsp;&nbsp;&nbsp; bluez.c: (.text+0x3c): undefined reference to "hci_open_dev"<br>&nbsp;&nbsp;&nbsp; bluez.c: (.text+0x3c): undefined reference to "hci_get_route"<br>&nbsp;&nbsp;&nbsp; .....<br><br>&nbsp;&nbsp;&nbsp; My phone is the newest GAT02. I checked LDFLAGS environment variable does not include /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib, only include /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib, but when I add
 /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib into the LDFLAGS, and re-run om-config,....,&nbsp; I still got the same error. <br>&nbsp;<br>&nbsp;&nbsp; Another question, gtk-x11-2.0 is under the /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib,&nbsp; LDFLAGS only includes /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib, but I can successfully build a GUI program and run at the phone. Why that happen?&nbsp; Is that (/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib) the default library search path for the toolchain?<br>&nbsp;&nbsp; <br><br>&nbsp;&nbsp; Very much appreciate your help<br><br>Jun<br>&nbsp;<br><br><br></td></tr></table><br>