The documentation tells me that /D command-line switch can be used to do this, like so:
CL /DDEBUG TEST.C
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
#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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With