<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Bo Berglund via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 16. Juni 2021, 13:32:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 16 Jun 2021 12:30:55 +0200, Mattias Gaertner via fpc-pascal<br>
<<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>> wrote:<br>
<br>
>> Since the final binary size after using strip -s on the exe file is<br>
>> 271 kb it seems a bit big!<br>
>> Or is there a lot behind the scenes I have missed?<br>
><br>
>Classes is a hog.<br>
><br>
I commented it away ane recompiled.<br>
Worked fine so Classes is not needed. :)<br>
<br>
And the executable size after strip -s is now 126 kb. A big improvement!<br>
<br>
But compile did not say used unit Classes was not needed...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Because the Classes unit has initialization and finalization sections. If a unit contains such it is always considered as needed, after all these sections might be used to register something in a third unit. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>