first of all, i got into a problem last time when trying to compile a c program to linux- arm architecture, for using it in an android app later. I succeeded in doing so, and i’ll write later a post on how to use the NDK standalone toolchain.
Now that i’ve finally got that working, I’m trying to compile a .c file, which has a line “include bluetooth/bluetooth.h” in it. When I try to compile the file, i get a: “no such file or directory” error on it. My makefile includes the word “-libbluetooth”.
The standart NDK gcc library does’nt have a bluetooth support, so i’ve downloaded “libbluetooth.so” from my device, which is what i needed to make it work, according to the brief research on the subject over the internet. I still get the same error.
I’ll be glad to know if anyone has encountered the same problem.
thank u
Dekel
You need the bluetooth library to link your program; but to compile it, you need the appropriate headers. libbluetooth.so is not part of Android official API, but luckily you can find it sources and the include files that declare its public (but unofficial) API, if you download the AOSP source tree, according to Google’s instructions. Actually, you are interested in a small part of the tree:
./external/bluetooth/bluez/lib. There you will find thebluetooth/bluetooth.hinclude file. In yourAndroid.mk, you will have a line similar to: