/Dname[= | # [{string | number}] ]
This option defines symbols or constants for your source file. This option has much the same effect as using a #define preprocessor directive at the beginning of your source file. However, /D strips quotes on the command line while #define retains them. A constant remains defined until an #undef directive in the source file removes the definition or the compiler reaches the end of the file.
You can use constants created by this option with #if or #ifdef to compile source files conditionally.
This option can define a keyword, identifier, or numeric constant that is also defined in a source file. The option definition remains in effect until a redefinition is encountered in the source file.
To undefine a previous definition, use /D option with a keyword, identifier, or numeric constant followed by the equal sign and a space.
The following command defines the symbol DEBUG in TEST.c:
CL /DDEBUG TEST.C
The following command removes all occurrences of the keyword __far in TEST.c:
CL /D__far= TEST.C
You cannot set the CL environment variable to a string that contains an equal sign. To use /D with the CL environment variable, you must specify a number sign instead of an equal sign:
SET CL "/DTEST#0"
Compiler Options | Setting Compiler Options | Undefine Symbols (/U | /u)