Linux / bluetooth / bluetooth.h在哪里?

问题描述 投票:38回答:2

我想基于BlueZ构建一个c文件,但是在我的系统中似乎没有bluetooth.h文件。

fatal error: bluetooth/bluetooth.h: No such file or directory

我确定蓝牙加密狗正在正确运行,并且我已经成功构建了Bluez。

更新

对于我来说,我在/ user / include / bluetooth文件夹中找到了bluetooth.h

c linux bluetooth ibeacon bluez
2个回答
73
投票

您需要安装libbluetooth-dev软件包才能编译代码

sudo apt-get install libbluetooth-dev

应该安装蓝牙头文件。


1
投票

对于Fedora,您可以使用:

sudo dnf install bluez-libs-devel
© www.soinside.com 2019 - 2024. All rights reserved.