I have a unit which is the part of several modules(dll, applications).
In some of them I need to use in that module their classes.
Is it possible to use compiler directives (or other methods) to include the unit to the file in case it is included in the project?
Thanks!
If I understood you correctly, the answer is yes. You can use a conditional define in the uses clause:
and then define (or not) a conditional define
USE_MYSTUFFin the project options.See also
$IFDEF,$DEFINEand$INCLUDEdirectives and Conditional Compilation.