Re: using gobject without gtk



Le vendredi 22 janvier 2010 à 21:18 +0100, Martin Kalbfuß a écrit :
> Hi,
> 
> I want to use gobject for an extension of the allegro library. Without
> touching gtk+.
> 
> When I compile my test program. I get
> 
> (process:17961): GLib-GObject-CRITICAL
> **: /build/buildd-glib2.0_2.22.4-1-i386-jRfNZE/glib2.0-2.22.4/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function
> 
> (process:17961): GLib-CRITICAL **: g_once_init_leave: assertion
> `initialization_value != 0' failed
> 
> (process:17961): GLib-GObject-CRITICAL **: g_object_new: assertion
> `G_TYPE_IS_OBJECT (object_type)' failed
> 
> 
> Google tells me to call gtk_init. And that's the problem. What I have to
> do, to initialize it properly?

1. do not google, just read the docs
2. call g_tipe_init() in your code before the creation of any GObject



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