Re: [Vala] Question about vala-gen-introspect



On Mon, 2010-12-06 at 13:28 -0600, W. Michael Petullo wrote:
> I am trying to figure out how to generate a Vala API file for
> libdmapsharing, http://www.flyn.org/projects/libdmapsharing/. This
> library may be used to create DAAP and DPAP servers and clients. I have
> read the document at http://live.gnome.org/Vala/Bindings.
> 
> I am using vala-0.10.0 and have tried the following sequence:
> 
> 	mkdir libdmapsharing-2.2
> 	echo "include/libdmapsharing-2.2" > libdmapsharing-2.2/libdmapsharing-2.2.files
> 	echo "lib64/libdmapsharing.so" >> libdmapsharing-2.2/libdmapsharing-2.2.files
> 	echo "DMAP" > libdmapsharing-2.2/libdmapsharing-2.2.namespace
> 	vala-gen-introspect libdmapsharing-2.2 libdmapsharing-2.2
> 	vapigen --library libdmapsharing-2.2 libdmapsharing-2.2/libdmapsharing-2.2.gi
> 
> When I run "vala-gen-introspect," I get the following output:
> 
> [...]
> Unknown symbol: GObject
> Unknown symbol: GObject
> Unknown symbol: GObject
> Unknown symbol: GObject
> Unknown function directive: share
> Unknown function directive: share
> Unknown function directive: share
> Unknown function directive: share
> Unknown function directive: service_name
> Unknown function directive: passcode
> Unknown function directive: library_name
> Unknown function directive: player
> Unknown function directive: db
> Unknown function directive: container_db
> Unknown function directive: blob
> Unknown function directive: id. This record should
> [...]

These are just warnings. The generated GIDL should be okay, however...

> Later, I run "vapigen --library libdmapsharing-2.2
> libdmapsharing-2.2/libdmapsharing-2.2.gi" and get:
> 
> error parsing GIDL file: Error on line 1 char 1: Document must begin with an element (e.g. <book>)
> Generation succeeded - 0 warning(s

Take a look at the generated libdmapsharing-2.2.gi, line 1, character 1.
It looks like the author of libdmapsharing-2.2 left in a debugging
statement.

http://git.gnome.org/browse/libdmapsharing/tree/libdmapsharing/dacp-player.c#n31

> The resulting libdmapsharing-2.2.vapi is empty, aside from default heading comment.
> 
> I have not been able to find a definition of the "Unknown function
> directive" error. What does this error message mean?

They are from v-g-i attempting to parse comments which aren't intended
for it. You can just ignore them.


-Evan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]