I installed Bluez version 5.47 onto a Pi-3 running Raspbian version 9 (Stretch). files were copied into /home/pi/bluez-5.47 directory and successfully executed the dependencies, compile, make and install scripts. The "bluetoothctl" tool seems to work correctly, however I am having difficulties programming the interface in c. The include libraries were located and copied to eliminate the “bluetooth/bluetooth.h” not found error. I copied the bluetooth,h file from the bluez-5.47/android directory to the /usr/include/bluetooth directory.
Now when I compile with the following command
gcc simplescan.c -lbluetooth -o scan
I get the following error msg,
/usr/bin/ld: cannot find -lbluetooth
A search for the bluetooth.so file finds it at the following location
/usr/lib/arm-lunux-gnueabohf/lxpanel/plugins
I copied the bluetooth.so file to the /usr/bin directory and still get the same error.