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

View: New views
2 Messages — Rating Filter:   Alert me  

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

by Jens Pelzetter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

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
/usr/include/glib-2.0/glib.h:31:25: error: glib/garray.h: No such file
or directory
/usr/include/glib-2.0/glib.h:32:30: error: glib/gasyncqueue.h: No such
file or directory
/usr/include/glib-2.0/glib.h:33:26: error: glib/gatomic.h: No such file
or directory
/usr/include/glib-2.0/glib.h:34:29: error: glib/gbacktrace.h: No such
file or directory
/usr/include/glib-2.0/glib.h:35:26: error: glib/gbase64.h: No such file
or directory
/usr/include/glib-2.0/glib.h:36:32: error: glib/gbookmarkfile.h: No such
file or directory
/usr/include/glib-2.0/glib.h:37:25: error: glib/gcache.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?

My OS is Gentoo Linux, with the following version of the libraries and
tools:

glib      : 2.16.5
gtk-doc   : 1.10
pgk-config: 0.23
autoconf  : 2.61
automake  : 1.10.1
make      : 3.81

Best regards,

Jens




_______________________________________________
gtk-doc-list mailing list
gtk-doc-list@...
http://mail.gnome.org/mailman/listinfo/gtk-doc-list

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

by David Nečas (Yeti)-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
gtk-doc-list mailing list
gtk-doc-list@...
http://mail.gnome.org/mailman/listinfo/gtk-doc-list