Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dbus - how to set include paths

On my system dbus headers are placed in /usr/include/dbus-1.0/dbus/ and dbus-arch-deps.h is other location (what seems to be strange): /usr/lib/x86_64-linux-gnu/dbus-1.0/include/dbus/dbus-arch-deps.h In my program I include #include<dbus-1.0/dbus/dbus.h>but in every header file which include others path looks like this: #include<dbus/xxx.h> I can copy dbus-arch-deps.h to /usr/include/dbus-1.0/dbus/ but how to fix paths in dbus headers ?

like image 953
Irbis Avatar asked Dec 05 '25 05:12

Irbis


1 Answers

Your system likely has pkg-config installed.

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

Pkgconfig contains a database of linker/compiler/etc. flags that are required to use specific libraries. See man pkg-config for more info.

like image 166
WGH Avatar answered Dec 07 '25 20:12

WGH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!