Search code examples
delphiembedded-resource

Conditional define in a compiler directive?


Can a conditional define like $(Config) be used in compiler directives?

For example:

{$R Payload.res Resources\THE_DEFINE\ResTHE_DEFINE.rc}

Solution

  • Can a conditional define like $(Config) be used in compiler directives?

    The simple answer is no it cannot.

    If I were trying to compile and link a resource conditionally, I would do so using an external build script invoked from a pre-build action.