delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/01/18:31:32

From: "Grzegorz Adam Hankiewicz" <gregorio AT jet DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: bloated exe files
Date: Sun, 31 Aug 1997 15:03:38 +0200
Organization: Unisource Espana NEWS SERVER
Lines: 36
Message-ID: <5ubq44$o8$2@talia.mad.ibernet.es>
References: <19970831013800 DOT VAA25889 AT ladder01 DOT news DOT aol DOT com>
NNTP-Posting-Host: info41.jet.es
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>i have 25-30kb of code and my exe is 250k !!!
>is this because of lib's i've linked? and i only linked standard c/c++
>libs...  is their a way i could fource djgpp to only include the 'critical'
>code?  if not, does the source for the lib's come with djgpp's own source?

Well, as others usually say... READ THE FAQ!!!

However, here it goes again ...

Imagine a program foo.c
Compile it with : gcc -o foo.exe foo.c -s
Yes, the '-s' switch makes the compiler strip all unneeded things from the
exe. For example, you won't be able to debug it now.
This usually makes the exe 50% smaller.

Now, get the DJP compression program. I got it in a file named "mlp105b.zip"
Install it. Now, type : djp foo.exe.
The size of the exe will again reduced to (hopefully) 50%.

All in all, you reduce the 100% size to around 25-30% .

A last example of this :
My actual project (which is very small) has some c files. Total : 25Kb.
If I compile without any switches I get a 130Kb exe. With the '-s' switch I
get a 55kb exe.
Then, compressing it with djp the final result is a 33kb exe, only 8kb more
than the source.

- G.A. Hankiewicz - ICQ 255289 - gregorio AT jet DOT es
        http://web.jet.es/gregorio
- Gogosoftware
        http://gogosoftware.base.org




- Raw text -


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