Re: [Vala] vapigen and Autotools problem



Abderrahim,
  I did. In fact I needed to, in order to generate the Sql-0.1.gir and the
subsequent .girs'.

  I noted that the name the error gives to the package is not the same I
gave it when exporting it. I called it gvn-0.1 and the error talks about
Gvn-0.1, which is not a correct package name. I thought vapigen parsed the
name from the .gir and lower the case. May be the name the error gives to
the package has no relevance, I don't know.

  As you can see, I'm kind of lost right now in all this .vapi generation
thing (it's the first time I use a mailing list!), but I guess this is the
funniest part of programming. Thanks for the link, I'll give it a look.

  Thanks!

Regards,
  Alex.


El 27 de marzo de 2012 18:07, Abderrahim Kitouni <a kitouni gmail com>escribió:

في ث، 27-03-2012 عند 17:05 +0200 ، كتب Alejandro T Colombini Gómez:
August,
  I just didn't know that. Reading the documentation and looking at an
official gnome project (GDA, that does the same thing I was trying to
do) I
though it was the only way to bind C to Vala. And the other developers I
mentioned are using Vala by the first time, too.

  If I can do this that way I'll save some time! Can you give me some
reference to that method?

Actually, the recommended way to use a gobject library from Vala is to
generate the vapi from the GIR. It's actually possible to use the GIR
directly, but I'm not sure whether it's a good idea.

Anyway, in case you didn't already see it, look at this:
http://live.gnome.org/Vala/UpstreamGuide

As for your question:
  To generate the .girs I've used the --include-uninstalled option to
include the previously generated .gir file of the project. Now, when
the
build system tries to run vapigen to generate a .vapi that depends on
another part of the library, it fails.

  The call to vapigen is something like this:
    $(VAPIGEN) --pkg glib-2.0 --pkg gobject-2.0 --pkg gvn-0.1 -d
$(vapidir) --vapidir=$(vapidir) --library foo-0.1 Foo-0.1.gir

  The .vapi file of the "gvn" package is alredy generated (and put in
the directory specified via the --vapidir option) at this point, as
well
as the .gir of the current package.

  And this is the error it produces:
    error: Package `Gvn-0.1' not found in specified Vala API
directories
or GObject-Introspection GIR directories

Just a guess, but I think the problem is that your gir file doesn't
reference the package, and so valac doesn't know that gvn-0.1.vapi and
Gvn-0.1.gir are the same. You have to add --pkg-export=gvn-0.1 to your
g-ir-scanner flags.

HTH,
Abderrahim




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