www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/28/14:54:27

To: jason AT iimage DOT com DOT au
Cc: djgpp AT delorie DOT com
Subject: Re: Large .exe size
Message-ID: <19970228.145100.7567.0.fwec@juno.com>
References: <3316731C DOT 2CEE AT iimage DOT com DOT au>
From: fwec AT juno DOT com (Mark T Logan)
Date: Fri, 28 Feb 1997 14:44:07 EST

On Fri, 28 Feb 1997 16:54:37 +1100 Jason Collins <jason AT iimage DOT com DOT au>
writes:
>
>------------388EFD4D1E0
>Content-Transfer-Encoding: 7bit
>Content-Type: text/plain; charset=us-ascii
>
>Hi all,
>
>I have only recently installed djgpp (v2) and decided to port an
>existing (very simple) graphics program to gcc using allegro 2.2.
>Everything went very smoothly, however when I compiled using gcc, the
>executable was 269kb compared to 24kb using Turbo C and my own pixel,
>line etc functions.  I have included my source code (only short) and
>would appreciate help from anyone who could explain why this occured.

We all love to answer peoples questions (and have our own answered), but
could you do me a favor?  Don't stick the HTML copy of your message on
the
end of the message.  Nobody (afaik) needs it, it just takes up space. 

On to your question....

You probably aren't going to get an .exe as small as the one TC will
produce,
no matter what you do.  This is because gcc puts a lot of stub info and
other
things that I don't understand and shouldn't be talking about into your
program.
However, try using...

gcc -s (rest of your normal command line)

This will strip all the debugging info out of your .exe, so you won't be
able to
debug this .exe, but your program size can be reduced by 50% or more.

-Fwec

- Raw text -


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