delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/03/28/11:00:41

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Jesper Lund" <jelu AT despammed DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Reducing executable size (plz it's kinda important)
Date: Sun, 28 Mar 2004 17:51:15 +0200
Lines: 27
Message-ID: <c46sc0$2f18tq$1@ID-192146.news.uni-berlin.de>
References: <a8587dd9 DOT 0403280609 DOT 64756c58 AT posting DOT google DOT com>
NNTP-Posting-Host: 0x50a6b7dd.bynxx14.adsl-dhcp.tele.dk (80.166.183.221)
X-Trace: news.uni-berlin.de 1080489156 82879418 I 80.166.183.221 ([192146])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Chris Mantoulidis <cmad_x AT yahoo DOT com> wrote:

> I only include the <fstream> header in my file (besides my code)
> and i end up with a 3MB file!?!?!?!?!!!?!?
>
> What can I do to reduce the file size?

Running strip on the .exe will reduce the file size, but probably not by
2-3 Mb. Also reading the FAQ will be a good idea (you are not the first
to ask this question).

> Would posting the code help? But as I said I believe it's <fstream>
> causing all the trouble

I find that very unlikely. Yes, C++ libraries are larger than equivalent
C libraries, but the difference is nowhere near 2-3 Mb.

> (And the same -with some modifications- source with Turbo C++ 3.0
> gives me a 33KB file, but TC++ can't handle huge arrays).

Do you have large static arrays in your code? IIRC, they get included in
the .exe under DJGPP. TC++ could be different.

-- 
Jesper Lund


- Raw text -


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