D-bus application compilation problem-serious.

Dean Jenkins djenkins at mvista.com
Thu Jun 24 01:04:27 PDT 2010


Hi, Mukesh,

> But,when I compile it with gcc-4.2.0 ,with all compilation options of –libs
> –glib-2.0 –dbus-1.0 etc. I am always getting some error
>
> Related to any library functions. Like undefined refrence to
> dbus_bus_acquire_service() or dbus_g_proxy_for_new_service.
>
>
>
> Can someone please guide me about this problem.
>

I use the following in my Makefile for GLib D-bus binding (sorry I
don't yet use Qt D-bus binding)

PKG_LIBS := $(shell pkg-config --libs --cflags glib-2.0 dbus-1
dbus-glib-1 gthread-2.0)

By using pkg-config it will automatically set the required build flags
without you worrying about it.

Then just give $(PKG_LIBS) to the compiler and linker.

I hope that helps ?

Regards,
Dean


More information about the dbus mailing list