[10412] 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 (Mitsuru Oka)
Tue Nov 24 17:01:14 1998

To: gtk-list@redhat.com
From: Mitsuru Oka <95i44@is.kochi-u.ac.jp>
In-Reply-To: Your message of "Tue, 24 Nov 1998 16:56:57 -0500 (EST)"
	<199811242156.QAA08801@pretzel.normnet.org>
Date: Wed, 25 Nov 1998 07:00:28 +0900
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


On Tue, 24 Nov 1998 16:56:57 -0500 (EST)
	jgarzik@pobox.com(Jeff Garzik)  said:
jgarzik> Matt Rosencrantz wrote:
> but, how do you set the compiler flags to link some libs statically and
> some libs dynamically?

jgarzik> For the libs you specific want static, or specifically dynamic,
jgarzik> reference the full lib pathname.

jgarzik> 	gcc -o foo foo.o /usr/lib/libglib.a /usr/lib/libgtk+.a


I think it will be work at gcc/gnu ld:

 $ gcc -o foo foo.o -Wl,-Bstatic -lgtk -lgdk -lglib \
               -Wl,-Bdynamic -lXext -lX11 -lm

--
Mitsuru Oka
95i44@is.kochi-u.ac.jp

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


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