www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/06/21:42:02

Xref: news2.mv.net comp.os.msdos.djgpp:2487
From: Vladislav Panferov <vkat AT math DOT chalmers DOT se>
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: <Pine DOT SUN DOT 3 DOT 91 DOT 960327171330 DOT 4844I-100000 AT is>
NNTP-Posting-Host: radon.math.chalmers.se
Mime-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019