I want to compile and run the following bluetooth scan code bluetooth scan code on eclipse neon.
I need to run it on Raspberry pi 3, so I did the following:
1- I downloaded the latest bluez version 5.43 from bluez
2- I compiled the downloaded file on my pi following the steps mentioned at Adafruit
3- I copied the compiled folder "bluez-5.43" from my Pi to the Pc to use it with eclipse. I am developing using Sysgcc cross compiling toolchain Cross Compiling on windows using SyssGcc toolchain
4- I prepared the eclipse after installing the SyssGcc toolchain using the steps on Setting Up Cross-Compilation In Eclipse
5- I created a c++ project and copied the main code of the bluetooth mentioned in the first URL and went to:
Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Includes
In Include paths (-l) i add: .....\bluez-5.43\lib\
On eclipse Project > Properties > C/C++ Build > Settings > GCC C++ Linker > Libraries
In libraries (-l) i add: bluetooth
In Library search path (-L) i add: ....bluez-5.43\lib.libs
but when I compile I get the following error, any help please for some one knows how to compile the code using eclipse and the cross compiling toolchain ??
10:17:08 **** Incremental Build of configuration Debug for project Bluetooth_test ****
make all
'Building target: Bluetooth_test'
'Invoking: Cross GCC Linker'
arm-linux-gnueabihf-gcc -L"C:\Users\aawad\Desktop\bluez-5.43\lib\.libs" -o "Bluetooth_test" ./src/Bluetooth_test.o -lbluetooth
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -lbluetooth
collect2.exe: error: ld returned 1 exit status
make: *** [Bluetooth_test] Error 1
10:17:11 Build Finished (took 3s.57ms)