Mail Archives: djgpp/2000/08/10/18:30:25
From: | "Marp" <marp AT 0 DOT 0 DOT 0 DOT 0>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Exe. sizes...
|
Date: | Thu, 10 Aug 2000 18:20:22 -0400
|
Organization: | MindSpring Enterprises
|
Lines: | 30
|
Message-ID: | <8mv9q0$8nn$1@slb7.atl.mindspring.net>
|
References: | <QcFk5.924$B66 DOT 37337 AT news1 DOT news DOT adelphia DOT net>
|
NNTP-Posting-Host: | 04.30.99.7b
|
X-Server-Date: | 10 Aug 2000 22:19:44 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
"JS" <jmszczap82 AT adelphia DOT net> wrote in message
news:QcFk5.924$B66 DOT 37337 AT news1 DOT news DOT adelphia DOT net...
> Hey all,
> I'm writing a program with DJGPP and even though I've hardly written
> anything of any importance, it's already at 200 Kb. I heard that there's
> supposedly a way to reduce the executable size. Can someone help me out
and
> tell me where (perhaps somewhere in the loads of documentation) I can find
> this information? Thanks in advance...
> - JS
>
By default, gcc puts debugging information for source level debugging in the
exe. You can greatly reduce the size of the exe by using the -s option when
you link your program. Beware that if you do that you won't be able to do
source level debugging, so do it on release builds only. You can also use
the -Os option when compiling your source files to have gcc optimize its
output giving preference to optimizations that produce smaller code.
You really shouldn't worry about the size of the exe when you're developing
your program. It should only be of concern when you release your program.
You can also use an executable packer program to reduce the exe size even
further. I recommend UPX for this. You can find it at http://upx.tsx.org
Hope this helps.
Marp
- Raw text -