Am 08.12.2011 23:24, schrieb Mattias Gaertner:
On Thu, 08 Dec 2011 21:31:46 +0100
Sven Barth<[email protected]>  wrote:

On 08.12.2011 19:46, Krzysztof wrote:
Hi,

For example BGRAControls package. If I drop TBGRAButton on form,
Lazarus automatically add BGRAControls package as required in project
inspector. Then, If I build project, it seems that compiler adds all
controls from this package to exe even if I don't use them, because if
I delete BGRAControls package from required section and add path to
BGRAButton unit manually, then exe is much smaller. How does it work?
Exists any compilator optimization switch for strip unused units from
project packages?

Remove the unit BGRAControls from the uses section.
Or use "refactoring / unused units ...".

You might try to disable the option "Add package unit to uses-clause" in
the options of the package and see if that helps (I don't know whether
it does indeed help, but it's one of the first things I do if I create a
package or use one).

It's the default for new packages since some months.

I haven't used 0.9.31 since some months, so.... ;)

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to