ubuntu hoary missing dbus_g_bus_get ?

Don Park donp at personaltelco.net
Sun Jun 12 20:15:14 PDT 2005


Hi,
	Im trying to get familiar with dbus so i can add it to my
application (apradar.sf.net). Im reading over the article on linuxjournal
by robert love (http://www.linuxjournal.com/node/7744/print).

There is a code snippit that im trying to compile on ubuntu hoary, which
simply calls dbus_g_bus_get but the method is not found during the linking
stage.

im compiling with
g++ `pkg-config --cflags dbus-1` `pkg-config --cflags glib-2.0` play.cc
`pkg-config --libs dbus-1` `pkg-config --libs glib-2.0`

which gives the error
/tmp/ccjYTfrL.o(.text+0x2d): In function `main':
: undefined reference to `dbus_g_bus_get'
collect2: ld returned 1 exit status


i cant find the method by hand, either:

donp at orbiter:~/src/playdbus$ nm /usr/lib/libdbus-1.a | grep g_bus_get
donp at orbiter:~/src/playdbus$


the installed packages are:
ii  dbus-1              0.23.4-0ubuntu3     simple interprocess messaging
system
ii  dbus-1-dev          0.23.4-0ubuntu3     simple interprocess messaging
system (development head
ii  dbus-1-utils        0.23.4-0ubuntu3     simple interprocess messaging
system (utilities)
ii  dbus-glib-1         0.23.4-0ubuntu3     simple interprocess messaging
system (GLib-based share
ii  dbus-glib-1-dev     0.23.4-0ubuntu3     simple interprocess messaging
system (GLib interface)

with gcc 4.0:
g++ (GCC) 4.0.0 20050301 (prerelease) (Debian 4.0-0pre6ubuntu7)

and libstdc++6       version   4.0-0pre6ubuntu7

is this a known problem or am I doing something wrong?

thanks,
don
-- 


More information about the dbus mailing list