我应该定义_WIN32和_WIN64在64位构建? [英] Should I define both _WIN32 and _WIN64 in 64bit build?

查看:409
本文介绍了我应该定义_WIN32和_WIN64在64位构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们从已经存在的32位项目中添加64位配置时,Visual Studio默认会复制32位配置。 VS甚至复制 _WIN32

现在我所有的64位项目也定义了 _WIN32 ,尽管它们(64位PE)永远不能在32位Windows上运行。这是非常不舒服的我。



如果没有任何问题,我想删除 _WIN32 。我不确定。

如果我删除 _WIN32 定义,可以吗?

解决方案

_WIN32并不意味着你认为它。这意味着我使用Windows API。在Windows NT 3.1的日子里添加了32个后缀,使它与Windows版本3中使用的16位API截然不同。这个术语由于位的问题已经失去了意义。你可以在stackoverflow.com看到这个,[win32]标签带你到[winapi]。



不要删除它,你使用的是Windows API。 / p>

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
All my 64bit projects define also _WIN32 now, despite they(64bit PEs) never can run on 32bit Windows. It is very uncomfortable to me.

I'd like to remove the _WIN32 if it doesn't have any problem. I'm not sure about that.
Is it okay if I remove the _WIN32 definition?

解决方案

_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.

这篇关于我应该定义_WIN32和_WIN64在64位构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆