www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/16/06:31:44

Date: Fri, 16 Nov 2001 13:26:55 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Frank Musheler <fastm33 AT freemail DOT absa DOT co DOT za>
Message-Id: <1858-Fri16Nov2001132654+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <e1n8vtsgv3pft1k6ivb9206qlmqrdr3doi@4ax.com> (message from Frank
Musheler on Fri, 16 Nov 2001 02:35:53 +0200)
Subject: Re: compiled EXE is bloated in C++
References: <e1n8vtsgv3pft1k6ivb9206qlmqrdr3doi AT 4ax DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Frank Musheler <fastm33 AT freemail DOT absa DOT co DOT za>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 16 Nov 2001 02:35:53 +0200
> 
> #include <iostream.h>
> int main(void)
>    {
>    cout <<"Hello World!" << endl;
>    return 0;
>    }
> 
> the size of the EXE file is about to 240K when i compile with
> gxx -s hello.C -o hello.exe
> 
> I've read the FAQ and it says the file size should be more around 140K
> I have the binutils file bnu2112b.zip.

The FAQ was not yet updated for GCC 3.x.  The 3.x series implement a
much larger subset of the standard C++ language, and you pay the price
in executable size.  Standard C++ is a monstrously large language; if
the 200K overhead bothers you, don't use C++.

You can reduce the size of the executable by something like 5KB if
you compile with optimizations (-O2 switch).

> This only happens when I compile in C++, C programs compile to roughly
> the size mentioned in the FAQ.

That's because the C language didn't change much since the FAQ was
released.

> Also is there anyway to get the manual that isn't in INFO format?

There are HTML versions in the *d.zip files where you downloaded DJGPP
packages.  However, please note that the Info browsers have much more
powerful methods of searching the manuals for a certain subject;
these methods cannot be supported in the HTML format.  So you will be
losing the fastest ways of finding the information you need.  (You
can find the instructions for using the Info readers efficiently in
the file README.1ST that comes with djdev203.zip.)

If the problem is that you don't like the look-and-feel of the
standard text-based Info reader, I'd suggest to try the graphics Info
readers mentioned in section 5.1 of the FAQ.

- Raw text -


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