dbus-glib ld error becose of 'dbus_g_connection_setup_with_g_main'

rosen georgiev dewie at abv.bg
Mon Feb 28 04:35:24 PST 2005


hello to all ..
i'm trying to compile test code wich uses dbus-glib.
it works well when making calls to remote object methods but doesn't work not when receiving signals - it doesn't receive the signals :)
this is probably because i'm using g_main_loop without calling dbus_g_connection_setup_with_g_main (it compiles/links ok then). but when i do call 'dbus_g_connection_setup_with_g_main' i get this:

for

gcc $(pkg-config --libs --cflags dbus-glib-1) $(pkg-config --libs --cflags glib-2.0) -o dbus-test dbus-test.c

evaluating to

gcc -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ldbus-glib-1 -ldbus-1 -lglib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -o dbus-test dbus-test.c

returns:

/tmp/ccwgdmDX.o(.text+0x2cf): In function `main':
: undefined reference to `dbus_g_connection_setup_with_g_main'
collect2: ld returned 1 exit status

the source code that is compiled is from DBUS Tutorial on glib API but with added signal ... thingis. should i post it to?

I have updated resently so this should not be because of an outdated lib version. version of dbus-glib-1 and dbus-glib-1-dev is 0.23-1 from Debian.
ammm ... so what should i do ?

10Q 4 your time.



-----------------------------------------------------------------
http://www.electron.bg - НОВО: СПЕЦИАЛНИ ОТСТЪПКИ за маркова електроника


More information about the dbus mailing list