WIN32 是表示32位编译? 64位编译的宏是什么?#ifdef WIN32

解决方案 »

  1.   

    编译器预定义了以下宏来表示目标平台.
    Macro    Meaning_WIN64  A 64-bit platform._WIN32  A 32-bit platform. This value is also defined by the 64-bit compiler for backward compatibility._WIN16  A 16-bit platform.
    以下宏是架构特定的.
    Macro    Meaning_M_IA64  A 64-bit Intel platform._M_IX86  A 32-bit Intel platform.除非编写 CPU 架构特定的代码, 否则不要使用这些宏.
    在必要的地方使用 _WIN64, _WIN32, 宏 _WIN16.