[fpc-pascal] Exe size

Vincent Snijders vsnijders at quicknet.nl
Thu Sep 4 16:40:34 CEST 2008


Paul schreef:
> I have to use:
> 
> C:\FPC\2.2.2\bin\i386-win32\strip.exe --strip-all 
> D:\FreePascal\Projects\Test\Project1.exe,
> anything else fails.
> 
> In my Dutch version here, after compling is on the top position in that 
> compiler tab which is in fact before compling
> Probably a translation bug.
> 
> After compling, I got "Oeps - debugger crash".
> 
> Ayway, the size was still 1116 kb for and empty program (button and a 
> label) and the limit for my full program (Delphi) is 1 Mb
> There's still a long way to go ..

This won't get smaller unless you use UPX. So maybe you need to search 
another tool or framework (KOL) if you want smaller size.

> For Windows, it's not a problem (Delphi program), but I want it for 
> WinCE and I have the same restrictions there.
> 

You cannot have both: a small size without debug info *and* a working 
debugger.

So you have to make up your mind:
A: an executable that can be started with the debugger: enable the 
debugging options (-g or -gl) and disable stripping (-Xs) in the linking 
tab

or

B: an executable that has a small size and can be released: disable all 
debugging options (-g, -gl, -gh) and enable string (-Xs) in the linking tab.

Vincent



More information about the fpc-pascal mailing list