Help me please !!
David Berthelot
davidb@Magma-DA.COM
Thu Apr 19 10:08:00 GMT 2001
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
More information about the Gcc-help
mailing list