Delphi 7: undefine conditional expression on command line

Using the Delphi 7 command line compiler, I just see a parameter for defining conditional compilation:

-D<syms> = Define conditionals

Is it possible to define an indefinite condition?

I have defined DEVELOPMENT in the IDE and want to define only PRODUCTION in the command line compiler. The problem is that the command line compiler saves the IDE definitions. I would just cancel it as possible in world C.

+5
source share
2 answers

If you do not use the command line option, you can always add additional conventions on your devices or include such a file:

{$DEFINE FOO}

// Allow us to undefine foo at the command line by defining UNDEFFOO
{$IFDEF UNDEFFOO}
  {$UNDEF FOO}
{$ENDIF}

{$IFDEF FOO}
  ...
{$ENDIF}

Then use -D to install UNDEFFOO.

+3

{$UNDEF NAME}, , #undef C ++. . , . , C ++.

- .inc, , . , , .

, , Delphi . Delphi msbuild. IDE . , , . , , IDE, . - Delphi.

+3

All Articles