[Dev] DBus compile error
thiago.macieira at intel.com
Wed Aug 13 19:50:57 GMT 2014
On Wednesday 13 August 2014 16:08:26 Joao Marinho Assis wrote:
> Hi all,
> When I try to build, it does not find the header file:
> [ 27s] + export FFLAGS
> [ 27s] + LD_AS_NEEDED=1
> [ 27s] + export LD_AS_NEEDED
> [ 27s] + make -j16
> [ 27s] cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
> -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian
> -mfpu=vfpv3 -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb
> example-platform-app.c -o example-platform-app
> [ 27s] example-platform-app.c:2:28: fatal error: dbus/dbus-glib.h: No such
> file or directory
The problem is your Makefile. You forgot to tell the compiler where the dbus-
glib headers are.
Also, please note the warning from the dbus-glib people: don't use it.
In http://lists.freedesktop.org/archives/dbus/2014-August/016277.html, Simon
> I would strongly recommend not using dbus-glib. The only valid reason to
> use dbus-glib in 2014 is if your project has already been using it for
> several years and has not yet been able to escape (e.g. Telepathy and
> NetworkManager are in this situation).
> Modern GLib versions contain GDBus, which is a much better-designed API
> for D-Bus in C than dbus-glib.
> (dbus-glib is unmaintained; I am its unmaintainer. It is really not a
> good thing to be using and I'm trying to switch Telepathy away from it.)
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Dev