【发布时间】:2017-03-29 02:36:58
【问题描述】:
我想在eclipse neon上编译并运行以下蓝牙扫描码bluetooth scan code。
我需要在树莓派 3 上运行它,所以我做了以下操作:
1- 我从bluez下载了最新的bluez 5.43版
2- 我按照Adafruit 中提到的步骤在我的 pi 上编译了下载的文件
3- 我将已编译的文件夹“bluez-5.43”从我的 Pi 复制到 PC,以便与 eclipse 一起使用。我正在使用 Sysgcc 交叉编译工具链开发Cross Compiling on windows using SyssGcc toolchain
4- 我在安装 SyssGcc 工具链后使用Setting Up Cross-Compilation In Eclipse 上的步骤准备了 eclipse
5-我创建了一个c++项目,复制了第一个网址中提到的蓝牙的主要代码,然后转到:
项目 > 属性 > C/C++ 构建 > 设置 > GCC C++ 编译器 > 包含
在包含路径 (-l) 中,我添加:.....\bluez-5.43\lib\
日食 项目 > 属性 > C/C++ 构建 > 设置 > GCC C++ 链接器 > 库
在库中 (-l) 我添加:蓝牙
在库搜索路径 (-L) 中,我添加: ....bluez-5.43\lib.libs
但是当我编译时出现以下错误,请知道如何使用 eclipse 和交叉编译工具链编译代码的任何帮助?
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)
【问题讨论】:
标签: c++ eclipse bluetooth raspberry-pi bluez