[Lazarus] Packages and units with the same name

Marcos Douglas B. Santos md at delfire.net
Sun Oct 15 17:01:11 CEST 2017


On Sun, Oct 15, 2017 at 12:36 PM, leledumbo via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
>> I know how it works in a single program, but I thought that using
>> packages could be different... but not.
>
> Packages is Lazarus concept, the compiler has no idea about it at all. What
> Lazarus does with it is generate a unit with the same name as the .lpk
> containing all units belonging to the package in its uses clause (with
> additional Register procedure and initialization section containing
> RegisterPackage call, purely for linking with the IDE), then feed the
> compiler with it. The end result is no different than compiling the units
> manually. In the end, when used by a program, it's the same combinations of
> .o and .ppu pair that the compiler sees.

I see. Thanks.

Regards,
Marcos Douglas


More information about the Lazarus mailing list