The documentation tells me that /D
command-line switch can be used to do this, like so:
CL /DDEBUG TEST.C
This would define a DEBUG symbol, and
CL /DDEBUG=2 TEST.C
would give it the value 2.
But what do I do if I would like to get the equivalent of a string define, such as the following?
#define DEBUG "abc"
Due to the way command line is parsed in Windows, you'll have to escape the quotes.
CL /DDEBUG=\"abc\" TEST.C