我正在尝试从源版本5.12.3为我的主机系统(Ubuntu 18.04VM)构建qtconnectivity。当我试图在项目文件上运行qmake时,我得到了这个错误:
Project ERROR: Could not find feature bluez.我安装了每一个该死的bluez包,但是bluetoothd守护进程没有运行,我想这就是问题所在。下面是我安装的蓝牙相关软件包的列表:
udo apt list --installed | grep 'bluez\|bluetooth'
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
bluetooth/bionic-updates,bionic-updates,bionic-security,bionic-security,now 5.48-0ubuntu3.4 all [installed]
bluez/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed,automatic]
bluez-cups/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed,automatic]
bluez-obexd/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed,automatic]
bluez-tools/bionic,now 0.2.0~20140808-5build1 amd64 [installed]
gir1.2-gnomebluetooth-1.0/bionic-updates,now 3.28.0-2ubuntu0.2 amd64 [installed,automatic]
libbluetooth-dev/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed]
libbluetooth3/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed,automatic]
libbluetooth3-dbg/bionic-updates,bionic-security,now 5.48-0ubuntu3.4 amd64 [installed,auto-removable]
libgnome-bluetooth13/bionic-updates,now 3.28.0-2ubuntu0.2 amd64 [installed,automatic]
libqt5bluetooth5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,auto-removable]
libqt5bluetooth5-bin/bionic,now 5.9.5-0ubuntu1 amd64 [installed,auto-removable]有人知道如何解决这个错误吗?
发布于 2020-06-04 01:26:02
通常,您需要安装-dev包才能在编译时使用库。
下面是使用的测试qtconnectivity:https://github.com/qt/qtconnectivity/blob/dev/config.tests/bluez/main.cpp。您需要一个包含bluetooth/bluetooth.h的包。
search by file name in package contents显示了libbluetooth-dev。
https://stackoverflow.com/questions/62173149
复制相似问题