KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to learn how to use D-Bus with C bindings. I've never used D-Bus before. I'm following this tutorial , which I assume is the official one (Freedesktop.org). I've read it until this paragraph that gives a first sample program , but unfortunately I don't see any indication on this page about how to compile it or which libraries to include. Did I miss something ? My OS is Ubuntu 10.04 32bit. I installed the libdbus-glib-1-dev package. I tried to add #include <dbus/dbus.h> at the beginning of the source file, and to compile with $ gcc -ldbus-1 -I/usr/include/dbus-1.0/ -I/usr/lib/i386-linux-gnu/dbus-1.0/include -o my_dbus.bin my_dbus.c but I just keep failing: my_dbus.c: In function ‘main’: my_dbus.c:7:3: error: unknown type name ‘DBusGConnection’ my_dbus.c:8:3: error: unknown type name ‘GError’ ... Did I miss a point in the tutorial ? It not, could you please help me compile this piece of code ? Thanks in advance.
Tags (comma-separated)
Save Edits
Cancel