Could somebody please take a look at the attached project and explain why I'm getting "Illegal unit name" errors if DYNAMIC is defined in the main (.lpr) project file, and what I should best do about it? I'm open to constructive suggestions about how to distribute the four possibilities over directories etc.
Would have been nice of you to provide the full error which reads as follows:
python3_dynamic.pas(1,21) Error: Illegal unit name: Python3_dynamic (expecting PYTHON_DYNAMIC)
The point is that you're using the unit as
Python_dynamic in your main project file, but the unit itself is named
Python3_dynamic. You need to use the unit as
Python3_dynamic (you
could disable this using the
-Un switch, but I'm advising against that as that could lead to other troubles down the line).
dynamic is a procedure/function directive. if you use objfpc mode, try delphi mode, afaik it doesn't reserve directive as keywords.
That is completely irrelevant here, especially as the "dynamic" is part of other identifiers.