1

我正在尝试用 dbus 编译 qt,但它给了我以下异常。我已经在系统中安装了 dbus 1.3 版,我正在使用以下配置命令。有人可以指出我应该做什么。

configure -dbus -I/usr/include/dbus-1.0 -L/usr/local/dbus/lib -ldbus-1 -fast -prefix /home/thwijeth/Software/qt-4.8.1-com-debug -v

先感谢您。

qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
In file included from qdbusconnection_p.h:51,
             from qdbusconnection.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbuserror.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [qdbusconnection.o] Error 1
In file included from qdbusconnectioninterface.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbusconnectioninterface.o] Error 1
In file included from qdbusconnection_p.h:51,
             from qdbusintegrator.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbusintegrator.o] Error 1
make[1]: Leaving directory `/home/thwijeth/Software/qt-repo/qt-4.8.1-src/src/dbus'
make: *** [sub-dbus-make_default-ordered] Error 2
4

2 回答 2

0

对于这个丢失的标题,这个解决方案对我来说很好。但是,我得到了一个不同的错误fatal error: dbus/dbus-arch-deps.h: No such file。我通过将此文件从复制/usr/lib/x86_64-linux-gnu/dbus-1.0/include/dbus/usr/include/dbus-1.0/dbus/. 我不知道为什么这个标题/usr/include从一开始就没有在目录中。但这是我解决问题的方法。

问候

于 2015-03-31T09:40:14.590 回答
0

验证是否/usr/include/dbus-1.0包含dbus目录,如果不包含,验证是否/usr/include/dbus-1.0包含dbus.h,如果是,则需要创建指向dbus-1.0as的符号链接dbus

ln -s dbus-1.0 /usr/include/dbus

然后尝试重新运行配置。

于 2012-04-30T13:28:11.410 回答