Re: g-ir-scanner woes...



2009/1/17 Gary Kramlich <grim reaperworld com>:
> I've run into a few issues with g-ir-scanner and was hoping someone
> could help.
>
> First off, I'm getting a ton of warnings about unable to find include
> files, as well as syntax errors.  I assume this is because I'm trying to
> generate my .gir off of the source directly, and not off of an installed
> version.  Mainly what it comes down to is that I'm missing the needed
> cflags to make this all work.

You need to solve the 'cannot find header files' kind of warnings before
moving on. That can be solved by passing in the right include flags,
so both that headers internally to your project and external dependencies
can be found.

> I'll assume this next part is related to the first, but I'm missing 6 of
> my types.

If you solve the errors above this will probably be solved as well.
The scanner needs to following to detect a GType properly:
- the *_get_type() prototype definition (eg, header file)
- it need to be able to dlopen() the shared library where the _get_type function
lives can be called. pass in --library for that.

Currently we've had the policy of mapping a gir 1:1 to a shared library,
so if you have multiple shared libraries in your project you'll need multiple
girs as well

Hope this helps

Johan


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