My understanding is that when you add a "required package" what actually happens is that the IDE adds the package unit paths to the list of unit paths for your project, and adds the top level .pas file for the package (which usually has the same name as the package) to the "uses" clause in your project source file. The latter may not happen if an option is set in the package itself.

The result is that the package files get linked into your project. However, if you make the top level .pas file find a conditional reference from the uses clause then the package files only get linked in when the conditional is true.

Of course you also must do the same for any other units from the package that you include in your own unit files i.e. make their use conditional as well.

On 19/07/2019 14:21, Marcos Douglas B. Santos via lazarus wrote:
Maybe adding "dynamically" the Required Package, rather using
"dynamically paths" by Conditionals, could fix this?
But how to do this?

Just to be more clear, I don't have any "Duplicate units" as compiler is saying!
Thanks.

regards,
Marcos Douglas
--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to