[Lazarus] Packages and units with the same name

Marcos Douglas B. Santos md at delfire.net
Fri Oct 13 20:42:27 CEST 2017


Hi,

Imagine that we have two packages and each one has a global.pas unit like this:

BasePack
   /pkg
      basepack.lpk
   /src
      global.pas

SmartPack
   /pkg
      smartpack.lpk
  /src
      global.pas


Both packages have the same configuration:
Other unit files (-Fu) = ../src

But if SmartPack uses BasePack the compiler says that we have two
versions of global.pas

My question is:
How can I put some units in a package but in a way that these units
would be invisible in others packages?

I thought that only units included in package would be visible outside
(other programs/packages) but I realized that doesn't matter if were
included or not, the visibility is defined only by path (-Fu).

Best regards,
Marcos Douglas


More information about the Lazarus mailing list