Bad Dbus Install, sample program
dfeustel at mindspring.com
Sun Jun 24 05:00:34 PDT 2007
On Sun, Jun 24, 2007 at 01:53:15AM -0400, Havoc Pennington wrote:
> dfeustel at mindspring.com wrote:
> >The Install of dbus-1.0 does not copy the file
> >dbus-arch-deps.h into /usr/local/dbus-1.0/dbus.
> This file should be copied to /usr/local/lib/dbus-1.0/include/dbus since
> it is architecture dependent. (different for x86_64 and x86 for example)
The file is there. I copied that file to /usr/local/include/dbus for convenience
since I will only be compiling for OpenBSD 4.1 AMD 64-bit mode.
> This ends up on the include path if you use the output of
> "pkg-config --cflags dbus-1"
Pkg-config and the flag are new to me. Thanks for bringing it to my attention.
> >Also, the sample program in the wiki
> >does not compile. First, because the include file setup is not correct.
> It is correct if you build with the output of
> "pkg-config --cflags dbus-glib-1"
I have a minor configuration problem which I need to fix:
/home/daf/Dbus/dbus-1.0.2}pkg-config --cflags dbus-glib-1
Package dbus-glib-1 was not found in the pkg-config search path
dbus-0.94, dbus-glib-0.72 and dbus-python-0.80 are what is available from the
OpenBSD package repository. I can delete dbus 1.02 and install the three
dbus packages for OpenBSD 4.1 or build a new version of dbus-glib.
> >Second, because there are undefined functions and variables in the
> >sample code.
> Possible (don't know if that code is up to date) but be sure you link
> with "pkg-config --libs dbus-glib-1"
> Normally pkg-config is used with backticks:
> cc -O2 -g -Wall `pkg-config --cflags --libs dbus-glib-1` foo.c -o foo
> Note that ` is not the same as '
> Or if you have autoconf set up, use the m4 macros that come with pkg-config.
> The man page for pkg-config has some more detail, or look at pretty much
> any desktop-ish open source app's source code for an example.
> pkg-config should probably be mentioned in the dbus docs somewhere if it
> isn't, but I guess it's just sort of assumed along with usage of the C
> compiler and so forth so nobody thought to mention it.
Thanks for the info. I'm looking forward to learning how to use DBus.
Don't Worry. Be Happy.
More information about the dbus