Xref: news2.mv.net comp.os.msdos.djgpp:2487 From: Vladislav Panferov Newsgroups: comp.os.msdos.djgpp Subject: Re: Exe size Date: Fri, 05 Apr 1996 22:36:17 +0200 Organization: Dept. of Mathematics, Chalmers, Sweden Lines: 23 Message-ID: <31658441.2FFA@math.chalmers.se> References: NNTP-Posting-Host: radon.math.chalmers.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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