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 r
Based on the error returned by your gcc command. The gcc is able to see the
file (otherwise it will display error message indicating that he is not able to see the header file) but is not able to see some variables that should be exist in this file (‘DBusGConnection’
and ‘GError’
) . May be you are not using the adequate version of dbus
and try to use make file instead of one command
LDFLAGS+=-ldbus
CFLAGS+=-I/usr/include/dbus-1.0/
CFLAGS+=-I/usr/lib/i386-linux-gnu/dbus-1.0/include
all: dbus-example.bin
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^
dbus-example.bin: my_dbus.o
$(CC) $(LDFLAGS) -o $@ $^
clean:
rm -f *.o dbus-example.bin