Re: [Vala] gnome-db - binding problems



On Tue, 2009-01-20 at 19:24 +0100, Hans Vercammen wrote:
On Tue, 2009-01-20 at 16:02 +0100, Frederik wrote:
Hans Vercammen wrote:
/usr/include/libgda-3.0/libsql/sql_parser.h:122: syntax error, unexpected typedef-name, expecting 
identifier or '('
/usr/include/libgda-3.0/libsql/sql_parser.h:297: syntax error, unexpected typedef-name, expecting ')'
/usr/include/libgda-3.0/libsql/sql_parser.h:298: syntax error, unexpected typedef-name, expecting ')'
/usr/include/libgda-3.0/libsql/sql_parser.h:298: syntax error, unexpected ')', expecting ',' or ';'

sql_parser.h in v3 is not a GObject header file. I have manually created
a 'sql-parser.vapi' which currently contains some compact class stubs.

I have tried to add 'include/libgda-3.0/libsql/sql_parser.h' to
'libgda-3.0.excludes', but v-g-i still tries to parse it.

vala-gen-introspect reads the pre-processed output from gcc, so if any
other file includes sql_parser.h it's also included.

Yes, however, vala-gen-introspect includes a full C parser. While the
resulting bindings might not be very useful, it can parse non-GObject
header files equally well. If you get a syntax error, it's either a bug
in the header file or in the parser.

Alternatively, you could try using the new gobject-introspection
infrastructure for this, it contains an updated version of the C parser
among other things. vapigen can deal with the new .gir format, although
there is still some work needed.

Jürg




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