RE: [gtk-list] NEWBIE: Static Linking
- From: "Jim Scott" <jdscott execpc com>
- To: <gtk-list redhat com>
- Subject: RE: [gtk-list] NEWBIE: Static Linking
- Date: Fri, 27 Aug 1999 11:49:21 -0500
I'm a newbie, too, but I have been playing with a similar idea. I read the
GCC-HOWTO, which was very helpful. The default action is to dynamically
link. If you want to static link, I think there are two ways to do it.
First, you can use the -static flag, or you can actually specify the static
library when linking. I used the latter method when my linker wasn't able
to find the gtk libraries (gtk-config was confused between /usr/lib and
/usr/local/lib, as it turns out). I think you could use the latter method
to specify which specific static libraries you want to link against, and
link dynamically to the rest.
-----Original Message-----
From: Matt Long [mailto:matt.long@wcom.com]
Sent: Friday, August 27, 1999 10:51 AM
To: gtk-list@redhat.com
Subject: [gtk-list] NEWBIE: Static Linking
I'm sure this is a stupid question, but I just don't know the answer.
Yesterday Aaron, Faby posted a message on why his app was so big and how
to compile it so that it was dynamically linked. The answer that he came
up with sounded like it might be related to my question. I would like to
be able to ensure the opposite. I want to ensure my application is
statcially linked. I thought the -g had something to do with that, but
apparently (according to the man page) -g is just for debugging info. I
also noticed in the man page that there is a linker flag there called
-static. So what I was wondering is, what is the default action when
compiling gtk+ apps with gcc. Do they link statically automatically or
do I have to specify some kind of flag (-static, or something)?
Thanks in advance.
-Matt
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]