Re: glib.h
- From: Matthias Clasen <mclasen redhat com>
- To: gtk-list gnome org
- Subject: Re: glib.h
- Date: Wed, 15 Sep 2004 22:43:31 -0400
Am Mittwoch, den 15.09.2004, 21:24 -0700 schrieb Kermit Tensmeyer:
> Heck, I've use glib, gtk, pango, atk to build other software. And I _know_
> that it compiles clean. At this point (after digging thru the include files)
> I'm not sure I know how it could compile at all.
>
> Big changes between the glib-1.2 and the glib-2.0 version and specificly
> regarding glib.h. In three instances that I've found glib.h contains (and
> only contains) includes of <glib/gxxxxx.h> form
> and the gxxxx are in alpha order
>
> When I was building something (evolution, gtkhtml or something) the compile
> failed. It failed because G_BEGIN_DECL had not been defined when first used
> by gtypes.h when included by galloca.h.
>
> and likewise for a few other things. I rearranged glib.h so that
> #include <glib/gmacro.h>
> #include <glib/gtypes.h>
> #include <glib/galloca.h>
> were first
>
> and then I was stumped by another problem the typedef 'gsize' isn't defined
> in glib. (it's used extensively but not defined -and- it was defined in
> glib.h (version 1.2). The first and closest typedef of 'gsize' is in the gobj
> include directory.
>
> so why does any of this compile? I would have thought the test cases would
> have caught those compile type errors.
> (heck the only thing I can think of is that other includes had already
> defined those typedefs from another set of library references. But I think
> that glib should not be dependant on any other of the gnome libraries unless
> it is so documented..)
>
gsize (and other platform-dependent things) are defined in glibconfig.h,
which you'll find in $libdir/glib-2.0/include.
glibconfig.h gets included in glib.h via
glib.h -> galloca.h -> gtypes.h -> glibconfig.h
You are using pkg-config to get the correct CFLAGS for building things
against glib, right ?
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]