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

后端 未结 4 1065
不思量自难忘°
不思量自难忘° 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:57

    _WIN32 doesn't mean what you think it does. It means "I am using the Windows API". The 32 postfix was added back in the days of Windows NT 3.1 to make it distinct from the 16-bit API that was used in Windows version 3. This term has fallen out of favor because of the bitness problem. You can see this at stackoverflow.com, the [win32] tag takes you to [winapi].

    Don't remove it, you are using the Windows API.

提交回复
热议问题