Mail Archives: djgpp/1996/04/06/21:42:02
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) writes:
> On Wed, 27 Mar 1996, bonni mierzejewska wrote:
> > I'm too new to DOS to know why a programme compiled with a 32-bit compiler
> > is always bigger than the same programme compiled with a 16-bit compiler.
>
> First, don't forget to run `strip' on your program (or link with -s), or
> else you get debugging info/symbols with the GCC executable. Second, I
> think many 32-bit opcodes are longer than their 16-bit brethren. Third,
> last time I checked BCC (16-bit) and GCC produced very similar sizes of
> executables for a non-trivial program, the above gotchas notwithstanding
> (I *did* remember to strip, though).
I did remember either, but still the executable size for "Hello world!" program
is 32,768 bytes with "stdio.h" and 101,888 bytes with "iostream.h" (compiled with
"gcc -o hello.exe -O2 -s hello.c" and "gcc -o hello.exe -O2 -s hello.cpp -liostr" resp.)
Does this mean that it's impossible to get an executable smaller than ~100k when
using "iostream"?
Thank you,
V. Panferov
e-mail: vkat AT math DOT chalmers DOT se
- Raw text -