[Lazarus] Size of program executable very big...

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Feb 18 07:46:45 CET 2011


Op 2011-02-17 23:43, Bo Berglund het geskryf:
>>
>> http://wiki.lazarus.freepascal.org/Size_Matters
> 
> Trying to digest but very hard...

Yes, size is dependent on debug information and smartlinking. To make
your executables smaller you have a few options:

1) Strip debug information and enable smart linking.
   Project Options -> Code generation
   project Options -> Linking.

   The FPC parameters are:
      -CX -XX -Xs

2) Use a "lighter" GUI toolkit. fpGUI produces much smaller executables
   than LCL (handy for embedded work). MSEgui is somewhere in the
   middle.


I must add in LCL's defence... A simple application might end up having
a 10MB executable, but then it grows very slowly from there. If you have
to plot the executable size dependant on the size of the application,
the growth is NOT linear.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list