[Vala] .typelib support in Vala



Last year there was some discussion on the list about Vala's .gir support 
(https://mail.gnome.org/archives/vala-list/2011-April/msg00003.html).  Jürg said that Vala only reads the XML 
(.gir files) and not the .typelib files.

My question is, how should a developer deal with a situation where a library distributes a .gir (usable by 
valac) but the .gir references a namespace that's only available as a .typelib.  Because the .gir naming 
convention is CamelCase and not the same as Vala's lower-and-dashes, valac can't even find the VAPI and 
compilation fails.  In my case, I'm seeing this:

error: Package `GLib-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package `GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR 
directories
error: Package `Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories

There is a workaround: I can create hard links for the VAPIs (glib-2.0.vapi -> GLib-2.0.vapi, etc.), but I 
can't expect our users to do the same when they build our tarball.

-- Jim


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