Re: g-ir-scanner not recognising non-virtual functions



On 09/26/2011 04:10 PM, Tony Houghton wrote:
On Mon, 26 Sep 2011 15:57:15 +0200
Mikkel Kamstrup Erlandsen<mikkel kamstrup canonical com>  wrote:

Sorry if this is not a direct solution to your problem at hand, but if
possible (and I guess it is, if it's a "simple library wrapper") you
should reconsider writing your high level stuff in Vala, where you can
get the Vala compiler to generate gir directly. And with Vala you still
have it very easy with integrating bits and bobs in C if needed.
I've looked at Vala, but I'm so familiar with C I'd rather use that with
gob2 even though it's a bit more fiddly. And for the high level stuff I
had python in mind, which I also know well already.

With Vala would I be able to access the sqlite3 API directly or would I
still need to write a GObject wrapper in C anyway?

Vala has bindings for sqlite so no problem there. See https://live.gnome.org/Vala/BindingsStatus for the full list of what's included in the standard package.

Integrating C code with Vala is very easy. Just write you C code in normal .c files and manually write a myhacks.vapi file for the API you need to integrate and pass '--pkg myhacks' to valac. I use this a lot and it works very well.

Cheers,
Mikkel

PS: If we need to get further into Vala I suggest moving this discussion to the vala list :-)



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