www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/28/15:08:02

Date: Sat, 28 Feb 1998 12:07:39 -0800 (PST)
Message-Id: <199802282007.MAA15177@adit.ap.net>
Mime-Version: 1.0
To: umich AT gwis2 DOT circ DOT gwu DOT edu (Umberto Michelucci), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Size of executables...

At 03:57  2/28/1998 GMT, Umberto Michelucci wrote:
>Hi and excuse me,
>I have a small question, not really a problem. If you look at the
>directory /djgpp/allegro/examples you will see that the file ex1.exe is
>about 200 Kb. Now I have copied to another directory the file ex1.c and I
>have compiled with the lines
>
>	gcc -c ex1.c
>	gcc -o ex1.exe ex1.o -lalleg
>
>and I have obtained an executable of 370 Kb. Now what I'm doinf wrong? Is
>there any flag to use with gcc to avoid this? The program "hello world" is
>of about 80 Kb. Is it not too much? Does anyone have an idea? 

That's about normal, although it is large. See FAQ section 8.15 for what to
do about it. The short answers are `strip' and `djp'.

Using Allegro yields particularly large executables because, for
performance, most operations are done with lookup tables. This results in
linking in a lot more code than you actually use.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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