[fpc-devel] Delphi-like Packages, Plan
Marco van de Voort
marcov at stack.nl
Mon Oct 4 10:41:31 CEST 2010
In our previous episode, Dimitri Smits said:
> > The same effect could be achieved by a separation of packages into
> > (Lazarus-type) static libraries, and packages *designed* for dynamic
> > loading (plug-ins...).
>
> Delphi compiler does this as well. One caveat in this discussion is for instance:
> when you "build with runtime packages" vclXXX.bpl, db*.bpl; even though you didn't specify them, all packages your bpls depend on are loaded runtime only as well. (rtlXXX.bpl for instance)
>
> the reason is simply: there can only be one instance loaded of EVERY unit you use in your program (or that is included in some bpl).
(this is all in the http://wiki.freepascal.org/packages ovewview)
> It is therefore simple to say in delphi that you want to build with
> rtlXXX.bpl only, but still have the vclXXX.dcp statically linked into your
> executable when you use a TForm and include the Forms unit somewhere in
> your code.
But that will be smartlinked, so that can still be a netto win for small
apps.
More information about the fpc-devel
mailing list