example-service question
Steve Feehan
sfeehan at sbb.uvm.edu
Sat Mar 18 21:11:17 PST 2006
Hello. I found the problem. I should've been passing
--prefix=some_object to dbus-binding-tool. Perhaps the tutorial
should be updated to reflect this as the instructions given
don't produce a usable header file.
Steve
On Fri, Mar 17, 2006 at 10:59:53PM -0500, Steve Feehan wrote:
> I'm playing around with dbus (on Ubuntu Dapper with dbus 0.60) and
> tried to compile the example-service.c in the glib/examples
> directory. Here is what I do:
>
> dbus-binding-tool --mode=glib-server example-service.xml \
> > example-service-glue.h
> gcc $(pkg-config --cflags dbus-glib-1) -c -o example-service.o \
> example-service.c
>
> And get the following error:
>
> In file included from example-service.c:57:
> example-service-glue.h:158: error: '_hello_world' undeclared here (not
> in a function)
> example-service-glue.h:159: error: '_get_tuple' undeclared here (not
> in a function)
> example-service-glue.h:160: error: '_get_dict' undeclared here (not in
> a function)
> example-service.c: In function 'main':
> example-service.c:124: error: 'dbus_glib_some_object_object_info'
> undeclared (first use in this function)
> example-service.c:124: error: (Each undeclared identifier is reported
> only once
> example-service.c:124: error: for each function it appears in.)
> example-service.c:124: warning: passing argument 2 of
> 'dbus_g_object_type_install_info' from incompatible pointer type
>
> So I thought that maybe the problem was the lack of an <annotation />
> tag in the service xml file. I add the following <annotation /> tag
> to example-service.xml (shown with some context):
>
> <node name="/">
> <interface name="org.designfu.SampleInterface">
> <annotation name="org.freedesktop.DBus.GLib.CSymbol"
> value="some_object"/>
>
> And then:
>
> dbus-binding-tool --mode=glib-server example-service.xml \
> > example-service-glue.h
> gcc $(pkg-config --cflags dbus-glib-1) -c -o example-service.o \
> example-service.c
> example-service.c: In function 'main':
> example-service.c:124: error: 'dbus_glib_some_object_object_info'
> undeclared (first use in this function)
> example-service.c:124: error: (Each undeclared identifier is
> reported only once
> example-service.c:124: error: for each function it appears in.)
>
> I'm not sure how to resolve this error. I ran the service xml file
> given in the dbus tutorial through dbus-binding-tool and get the
> same result.
>
> Thanks.
>
> --
> Steve Feehan
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
--
Steve Feehan
More information about the dbus
mailing list