10

I'm trying to find out all the preprocessor defines of the Visual C++ compiler (MSVC). I can do

gcc -dM -E - < /dev/null

on GCC to dump all the preprocessor defines. Do we have something similar with the Visual C++ compiler compiler?

I'm using Visual C++ 9.0.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Surya
  • 1,139
  • 1
  • 11
  • 30
  • 2
    possible duplicate of [How to find out cl.exe's builtuin macros](http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-builtuin-macros) – ephemient Jan 09 '11 at 17:52
  • Does this answer your question? [How to find out cl.exe's built-in macros](https://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros) – Tom Honermann Nov 19 '22 at 00:34

1 Answers1

5

There is no such command. However, MSDN (both online and offline) lists all the preprocessor defines, both Microsoft specific, standard defined and ANSI defines.

Necrolis
  • 25,836
  • 3
  • 63
  • 101