Re: Trouble setting up gtk-doc: glib-object.h not found



On Mon, Nov 10, 2008 at 01:50:59PM +0100, Jens Pelzetter wrote:
> I'm writing an application/library which uses the GObject type system.
> To document my code, I want to use gtk-doc, but I've trouble with this.
> I've set up gtk-doc, but if I start make, I get the following error message:
> 
> libexample-scan.c:5:25: error: glib-object.h: No such file or directory
> 
> After this error, there many error messages like these:
> 
> /usr/include/glib-2.0/glib.h:30:26: error: glib/galloca.h: No such file
> or directory
> ...
> 
> When I look into the libexample-scanner.c file, I saw this line:
> 
> #include <glib-object.h>
> 
> I think these is the problem. In my source files, the equivalent line
> looks like this:
> 
> #include <glib-2.0/glib-object.h>
> 
> So, what is my error? What changes If have to made?

If you run

	pkg-config --cflags gobject-2.0

it will print something like

	-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

This means, using the standard CFLAGS, directory glib-2.0 is already
included in the path and not specified when including the header.

I suggest to use the standard CFLAGS and adjust your source files.  Then,
if your code compiles, gtk-doc-generated code compiles too.  See also

	http://library.gnome.org/devel/glib/stable/glib-compiling.html

Yeti



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