Re: Problem executing program against pixbuf 2.2.4 library
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Struan Bartlett <struan praguespringpeople org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Problem executing program against pixbuf 2.2.4 library
- Date: Fri, 17 Oct 2003 12:37:55 +0300
Struan Bartlett wrote:
Hello,
<...>
Here's the output of 'make' using pixbuf 2.2.4:
gcc -O2 -fno-strength-reduce -I../include -I. -I/usr/include
-I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE
-DFUNCPROTO=15 -DNARROWPROTO -DMITSHM -I/usr/include/gtk-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c -o prog.o prog.c
gcc -o prog -O2 -fno-strength-reduce -L/usr/X11R6/lib prog.o
-lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11 -lz -ljpeg -Wl,--export-dynamic
-lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
And here's the output of running 'prog' compiled using pixbuf 2.2.4:
$ ./prog
About to call gdk_pixbuf_new
(process:24925): GLib-GObject-CRITICAL **: gtype.c:1871: initialization
assertion failed, use g_type_init() prior to this function
This one means that you call gdk_pixbuf_new() before the g_type_init()
call. Just put g_type_init() call early in main(). When you area using
GTK+-2.0 or GDK they call g_type_init() in gtk_init() or gdk_init().
(process:24925): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault
This is because you missed g_type_init() call.
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]