New user and a question.
twogood at users.sourceforge.net
Sun Mar 6 22:39:20 PST 2005
On Sun, 2005-03-06 at 23:25 -0600, Nick Gray wrote:
> This last week I was at the SELinux Symposium in Silver Spring,
> Maryland. One of the Technical Sessions was titled SELinux and the Linux
> Desktop, where the speaker delved in security problems with the current
> linux desktop and how some of these could be addressed with dbus.
> Previous to this I had read the article in Linux Journal and decided to
> take a look at this myself.
> Now I don't do a lot of programming, mostly building others packages and
> installing them, but I am attempting to run the example from the linux
> journal article and having some problems.
> I am guessing the solution to this would be fairly obvious to someone
> who has been working with dbus, but it looks as if the functions
> referenced in the header files are not included in the lib.
> this is my problem.
> #define DBUS_API_SUBJECT_TO_CHANGE = 1
Remove the '=' above.
> #include <dbus/dbus.h>
> int main()
> DBusError error;
> DBusConnection *conn;
> conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
> This fails to link with the error of undefined reference to
> dbus_error_init and dbus_bus_get.
> Can someone help me here get through this example? Thanks
Try a command line like this:
gcc -o mydbusapp mydbusapp.c `pkg-config --cflags --libs dbus-1`
-\- David Eriksson -/-
SynCE - http://synce.sourceforge.net
ScummVM - http://scummvm.sourceforge.net
Desquirr - http://desquirr.sourceforge.net
More information about the dbus