Should I define both _WIN32 and _WIN64 in 64bit build?

后端 未结 4 1059
不思量自难忘°
不思量自难忘° 2020-12-14 01:35

When we add a 64bit configuration from a 32bit project that has already existed, Visual Studio copies the 32bit configurations by default. VS even copies _WIN32

4条回答
  •  粉色の甜心
    2020-12-14 01:43

    The documentation for the predefined macros says:

    _WIN32: Defined for applications for Win32 and Win64. Always defined.

    _WIN64: Defined for applications for Win64.

    So not only should _WIN32 always be defined, it does not cause any problem in 64-bit applications. Therefore, I'd suggest you don't remove it.

提交回复
热议问题