[10400] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: static link w/gtk

daemon@ATHENA.MIT.EDU (Tom Bech)
Tue Nov 24 15:32:58 1998

Date: Tue, 24 Nov 1998 20:34:33 +0000
From: Tom Bech <tomb@ii.uib.no>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Matt Rosencrantz wrote:
[snip]
> I actually did read the man page and so I tried as you suggested:
> gcc  -static -lgtk -lgdk -lglib -lX11 -lXext -lm -o twiz twiz.o interface.o
> io.o
> 
> (*.o had already been built with gcc -c ...)
> 
> unfortunately I just get a big list of undefined symbols(see below). I do
> have the *.a files, they are in the same place as the .so files, and my
> program builds find w/o the static option.  the *.a files were built when I
> installed gtk+... do I need to do something else?
> 
[snip]

try

gcc -static -o twiz twiz.o interface.o io.o -lglib -lgdk -lgtk -lX11 -lXext -lm

ld can be picky about the order of linking.

Tom

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post