收集了一些预定义宏
ANSI C:
__STDC_HOSTED__
__STDC__
__LINE__
__FILE__
__DATE__
__TIME__
C++:
__cplusplus
GCC:
__GNUC__
__GNUC_MINOR__
__GNUC_PATCHLEVEL__
__GNUG__ equivalent to testing (__GNUC__ && __cplusplus).
MinGW:
__MINGW32__
__STDC__
__GNUC__
_WIN32, __WINNT__, __MINGW32__, _X86_, i386, __GNUC__
VC:
_WIN32
_MSC_VER
_ATL_VER
_DEBUG Defined when compiling with /LDd, /MDd, /MLd, and /MTd.
_M_IX86
_MT Defined when /MD or /MDd (Multithreaded DLL) or /MT or /MTd (Multithreaded) is specified.
_UNICODE
CYGWIN:
__CYGWIN32__
Intel Compiler:
__INTEL_COMPILER
Borland:
__WIN32__
__BORLANDC__