gpt4 book ai didi

c++ - dbus - 如何设置包含路径

转载 作者:行者123 更新时间:2023-12-02 03:35:34 25 4
gpt4 key购买 nike

在我的系统上,dbus header 位于 /usr/include/dbus-1.0/dbus/dbus-arch-deps.h是其他位置(看起来很奇怪):/usr/lib/x86_64-linux-gnu/dbus-1.0/include/dbus/dbus-arch-deps.h在我的程序中,我包括 #include<dbus-1.0/dbus/dbus.h>但在每个包含其他路径的头文件中,如下所示: #include<dbus/xxx.h>我可以复制dbus-arch-deps.h/usr/include/dbus-1.0/dbus/但如何修复 dbus header 中的路径?

最佳答案

您的系统可能已安装 pkg-config。

g++ $(pkg-config --cflags dbus-1) main.c

Pkgconfig 包含链接器/编译器等的数据库。使用特定库所需的标志。请参阅 man pkg-config 了解更多信息。

关于c++ - dbus - 如何设置包含路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21602607/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com