gtk+-2/static linking



I've developed a small gui app using glade-2. I'm using RedHat 7.3 but I've compiled gtk+-2.2, glib-2.2 and other required libs. The app compiles and runs fine when linked dynamically. However, if I try to link some (or all) of the libraries statically, it compiles fine but does a seg fault with some errors.

The command which I used for compiling

gcc -o helper2 main.c interface.c callbacks.c
support.c `pkg-config --cflags gtk+-x11-2.0 gdk-x11-2.0 glib-2.0`
-L/home/mylib/lib -L/usr/X11R6/lib -Wl,-Bstatic -lgtk-x11-2.0
-latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -Wl,-Bdynamic -lm -lX11 -ldl
-lXinerama -lXext

Errors

(process:1366): GLib-GObject-WARNING **: invalid cast from (null)' to
<unknown>'

(process:1366): GLib-GObject-CRITICAL **: file gobject.c: line 1355
(g_object_get_qdata): assertion G_IS_OBJECT (object)' failed

(process:1366): GLib-GObject-WARNING **: invalid cast from (null)' to
<unknown>'

(process:1366): GLib-GObject-CRITICAL **: file gobject.c: line 1388
(g_object_steal_qdata): assertion G_IS_OBJECT (object)' failed

(process:1366): GLib-GObject-WARNING **: invalid cast from (null)' to
<unknown>'

(process:1366): GLib-GObject-CRITICAL **: file gobject.c: line 1377
(g_object_set_qdata_full): assertion G_IS_OBJECT (object)' failed

** (process:1366): CRITICAL **: file pangox-fontmap.c: line 1346
(pango_x_font_map_get_font_cache): assertion PANGO_X_IS_FONT_MAP
(font_map)' failed

** (process:1366): CRITICAL **: file pangox-fontcache.c: line 145
(pango_x_font_cache_load): assertion cache != NULL' failed

** (process:1366): WARNING **: Cannot load font for XLFD
'-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1

** (process:1366): CRITICAL **: file pangox-fontcache.c: line 145
(pango_x_font_cache_load): assertion cache != NULL' failed
Segmentation fault

I would appreciate any help.

Regards


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail




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