[Lazarus] Large program size - 1.8 MB for empty GUI project

Reenen Laurie rlaurie at gmail.com
Wed Apr 8 17:26:46 CEST 2009


2009/4/8 Alexey S. Smirnov <betatester at rambler.ru>:
> The Smart Link process should check what variables/functions/definitions are
> used in your project to cut off unused code. It is really simple to do so,
> if some units are listed in Implementation section - linker will only add
> unit functions that are mentioned in you code, not more.
> If units are listed in Interface section - it mean that potentially all
> codeĀ  from that particular unit should be included. Because your global
> variable/class should have access to all provided
> code/procedures/properties.

Marc Weustink (i think wrote):
> Just a note: some people think that units can be compiled in one pass -
> this is not true. The compiler must stop on every Uses clause, and

So .exe's should be (much) smaller if your uses units are put mostly
in implementation (not easy to find circular references), but we say
rather put it in interface?

If we have to do multipass why is it necessary to have a distinction
at all?  (Ok, because writing compilers isn't exactly a walk in the
park)...




More information about the Lazarus mailing list