Statically linked GTK app



Hi all,

	I'm having a problem creating a statically linked GTK application
and I was hoping someone could help me.  I've read the gtk-list archive
and there were quite a few messages about it, but I'm now stuck on
something else. 

	I would like everything linked in (not just GTK), so I've added
"-static" at the end of line that does the linking.  It all links fine
(except that I had to archive (ar) all of the atk .o files into a .a file
and place it in a directory where the linker could find it...not sure why
this did not happen to the other packages but only to atk). 

	When I run the executable, I get this error message:

** WARNING **: Error loading XPM image loader: Unable to load
image-loading module:
/home/rwan/gtk/lib/gtk-2.0/1.3.5/loaders/libpixbufloader-xpm.so:
couldn't open libtool archive

Gtk-CRITICAL **: file gtkpixmap.c: line 99 (gtk_pixmap_new): assertion
`val != NULL' failed

... [error messages repeat a bit] ...

Gtk-CRITICAL **: file gtkwidget.c: line 1571 (gtk_widget_show): assertion
`widget != NULL' failed
Cannot load module
/home/rwan/gtk/lib/pango/modules/pango-basic-x.so: couldn't open
libtool archive

... [these error messages repeat too] ...

	And then my program segmentation faults.  Before running my
executable, I ran "ldd" on it and it said it was "not a dynamic
executable".  And of course, the static version runs fine, so these files
(libpixbufloader-xpm.so and pango-basic-x.so) do exist.

	Does anyone know what I'm doing wrong?  Thanks in advance!

Ray

PS:  As you can tell above, my GTK version is 1.3.5 .






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