Reputation: 90804
I have a macro that is dynamically generated before compilation (it's supposed to contain the build number). However I think there's some error with the way it's generated so I would like to check the content of this macro. How can I do that?
I'm using the MSVC2008 compiler.
Upvotes: 0
Views: 340
Reputation: 206566
You can use /p
option and write preprocessor output to a file. Or
You can use /E
option and write preprocessor output to stdout
Upvotes: 2
Reputation: 41444
You can set the "Preprocess to a file" option on the project or file's properties to true. That will let you see exactly what the preprocessor emits.
(It's under Configuration Properties → C/C++ → Preprocessor.)
Upvotes: 2