This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help me please !!


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]