This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help me please !!
- To: Bien <linuxvn at saigonnet dot vn>
- Subject: Re: Help me please !!
- From: David Berthelot <davidb at Magma-DA dot COM>
- Date: Thu, 19 Apr 2001 10:07:56 -0700
- CC: gcc-help at gcc dot gnu dot org
- References: <987678011.2154.ezmlm@gcc.gnu.org> <01041919113304.01150@linuxvn>
Hi,
I am unsure of my answer but quite obviously the big size of the
executable is the drawback of static libraries and in my humble opinion
that's why people started to think about doing dynamic libraries. Back
to your problem, the reason is that the library is statically linked
that means the library is (partially) embedded in your program.
I don't think you can reduce that size except by doing dynamic linking.
David
Bien wrote:
> Hi all !
> I'm newbies here ! I just compile a very stupid file.c - only
> printf("hello");
>
> But I want gcc using static libs when It compiles my file,
> that is :
> gcc -static file.c -o file
>
> No error !
> But It's too big !!. Very big !! ~~ 900k
>
> help me to reduce its size
>
> I'm using Linux (RH6.2)
>
> Thanks