delorie.com/archives/browse.cgi | search |
From: | "Marp" <Marp AT 0 DOT 0 DOT 0 DOT 0> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Why are my file sizes so big? |
Date: | Thu, 15 Jul 1999 17:38:26 -0400 |
Organization: | Netcom |
Lines: | 27 |
Message-ID: | <7mlkcm$8f9@dfw-ixnews14.ix.netcom.com> |
References: | <7mlgqa$h6$1 AT autumn DOT news DOT rcn DOT net> |
NNTP-Posting-Host: | prn-nj3-12.ix.netcom.com |
X-NETCOM-Date: | Thu Jul 15 4:38:30 PM CDT 1999 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2014.211 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2014.211 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Travis <slardy AT erols DOT com> wrote in message news:7mlgqa$h6$1 AT autumn DOT news DOT rcn DOT net... > How come a program written with DJGPP and Allegro turns out so large?? > I made a simple program do display a bitmap on the screen @ 640x480 and it > was over 700k! what can i do to prevent this? Did you strip debug symbols? Did you turn on the optimizer? By default, debug symbols are left in the .exe so if it crashes you can debug it. To make as small an exe as possible: for compiling sources: gcc -c -O3 -mpentium -ffast-math -fomit-frame-pointer whatever.c (outputs whatever.o object file) and linking objects: gcc whatever1.o whatever2.o -o whatever.exe -s -lalleg Note that you won't be able to debug your program with these options, so only use them on sources that you have working properly. Programs that use allegro are typically around 200k at least. You can make them even smaller by using an executable packer like DJP or UPX. See the DJGPP FAQ for more information about making smaller .exes.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |