[Lazarus] Failure to recompile with a different define

Giuliano Colla giuliano.colla at fastwebnet.it
Thu Sep 1 12:53:57 CEST 2016


I have two Lazarus projects, let's call them project A and project B, 
which share the same sources, only with a different define: let's say 
-dProjA and -dProjB.

If, starting from a clean situation, I compile first project A, and then 
project B, most of the modules aren't recompiled, and I end up with a 
project B built with a mix-up of units, some compiled with project A 
define and some compiled with project B define.

I managed to find a way out: setting different unit paths for project A 
and project B solves the issue, but this situation may be rather 
confusing for an inexperienced user.

IMHO this is not a very unusual setup: it applies to any situation where 
the same base project must provide different options or features.

Is this a Lazarus issue or rather an fpc issue? Do ppu's include the 
defines used for compilation? If not, wouldn't it be advisable to add 
them somehow?

Giuliano







More information about the Lazarus mailing list