Re: [Vala] .typelib support in Vala
- From: Evan Nemerson <evan coeus-group com>
- To: Jim Nelson <jim yorba org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] .typelib support in Vala
- Date: Thu, 30 Aug 2012 16:52:21 -0700
On Thu, 2012-08-30 at 23:13 -0007, Jim Nelson wrote:
Thanks for the quick reply, Evan. To answer some of your questions:
Evan Nemerson <evan coeus-group com> wrote:
Sometimes you may have to install an extra package, but the GIRs
should
be available.
I'll probably open a ticket with Ubuntu about this.
Assuming you're talking about GLib, GObject, and Gio, Debian/Ubuntu
already distribute the relevant GIRs. They're in
libgirepository1.0-dev.
http://packages.debian.org and http://packages.ubuntu.com are useful if
you need help finding missing files (see the "Search the contents of
packages" section)
You should pass the pkg-config names of whatever dependencies you
need
to valac. valac will parse those VAPIs first, and there is an
annotation which will tell valac what GIR namespace the Vala
namespace
corresponds to.
At first I thought you'd figured it out, but I'm still seeing the
problem. The .gir file in question has these annotations inside it:
Sorry, what I wrote is /really/ misleading. valac still requires the
GIRs to be present. valac will still /start/ parsing the GIR. Once it
gets to a <package/> element (which tells us what pkg-config package
corresponds to that GIR) valac will look to see if that package has
already been provided and, if so, skip the rest of the GIR.
The CCode annotations aren't actually used in this context.
<include name="GLib" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gio" version="2.0"/>
To see my problem, rename GLib-2.0.gir. I use a simple Vala program
(Vala 0.17.5 installed):
void main() {
}
If I build like this, no problem:
valac test.vala --pkg=glib-2.0 --pkg=gobject-2.0 --pkg=gio-2.0
If I build like this, I get the error messages I mentioned earlier:
valac test.vala --pkg=glib-2.0 --pkg=gobject-2.0 --pkg=gio-2.0
--pkg=DBusGLib-1.0
I do see the VAPI annotations in the glib-2.0.vapi file (and the
others), but it looks like valac isn't properly making the connection
you mentioned.
-- Jim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]