Hi all!
I have a main unit and a library unit. (Actually, the stuff is very complex, but let's abstract to easy)
Library unit loads a *.dll library by filename defined in the constant.
I want the possibility to change this constant in the main unit by
{$DEFINE filename:='library.dll'}
But the documentation says:
The directive {$DEFINE name} defines the symbol name. This symbol remains defined until the end of the current module (i.e. unit or program)
...
Macros defined in the interface part of a unit are not available outside that unit! They can just be used as a notational convenience, or in conditional compiles.
So, the question is: how can I pass a constant to the library unit from the main unit before the program starts? Seems like $DEFINE (and maybe $MACRO ON) is perfect, I just need to share it between units. I need something like "Define global"...