[10395] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: static link w/gtk
daemon@ATHENA.MIT.EDU (Tom Bech)
Tue Nov 24 14:52:51 1998
Date: Tue, 24 Nov 1998 19:56:42 +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:
>
> Hello,
>
> I have written a utility app in gtk, and now I am trying to give a copy to
> my brother, however, he cannot install the gtk libs on his machine. So, I
> would like to link the g* libs statically.
>
> Can someone tell me how to do this, stupid question I know, but I am
> relatively new to unix development.
>
> thanks for any help
>
gcc -static -o foo foo.c -lglib -lgmodule -lgdk -lgtk -letc etc.
Provided that there is any static (*.a) g*libs, of course.
'man gcc' :)
Tom
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null