On Fri, Apr 28, 2006 at 09:35:49AM -0400, Brian Clow wrote:
> I'm developing an application that's heavily based on Glib for
> portability reasons.  I'm using GLib 2.10.1, and I'm trying to use the
> GKeyFile parser class, but I'm receiving an error when compiling both
> using visual studio 6.0 and gcc.  The error is "'keyFile' uses undefined
> struct '_GKeyFile'" (running visual studio on windows), or "variable
> 'GKeyFile keyFile' has initializer but incomplete type" (using gcc on
> Fedora).  
> 
> GKeyFile is typedef'd as a _GKeyFile struct in gkeyfile.h, but the
> _GKeyFile structure itself is never defined in any header file within
> the developer package...  Though I can see it's defined in the
> corresponding c file in the glib source package.  Am I missing
> something, or is there a problem with the header?  I've searched the
> mailing list/web and not found any reference to this whatsoever...

This is not a bug, it is a feature.

http://developer.gnome.org/doc/API/2.0/glib/glib-Key-value-file-parser.html#GKeyFile

Citing: The GKeyFile struct contains only private fields and
should not be used directly.

Not only you should not, but you cannot (unless you copy the
definitions to your sources, which obviously breaks badly
every time these internal structures are changed in GLib).
As a side effect you cannot declare GKeyFile variables, only
pointers to GKeyFile -- not that you could correctly
initialize such a variable anyway.

Yeti


--
That's enough.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to