简体   繁体   English

Visual Studio 2012本机C ++ DLL x86编译

[英]Visual Studio 2012 native C++ DLL x86 compilation

I have recently upgraded my toolset from Win 7 x86 / Visual Studio 2010 to Win 8 x64 / Visual Studio 2012. However, now my native C++ dll compiles as x64 rather than x86. 我最近将我的工具集从Win 7 x86 / Visual Studio 2010升级到Win 8 x64 / Visual Studio 2012.但是,现在我的原生C ++ DLL编译为x64而不是x86。 I haven't done anything other than move the code to the new O/S and load it into VS2012. 除了将代码移动到新的操作系统并将其加载到VS2012之外,我还没有做任何其他事情。

Does anyone know how I can force it to compile for x86? 有谁知道我怎么能强制它为x86编译?

转到项目的属性页,找到链接器 - > 高级 - > 目标计算机选项,并确保将其设置为MachineX86

Go to Build --> Configuration Manager --> Active Solution Platform and change it to x86. 转到Build - > Configuration Manager - > Active Solution Platform并将其更改为x86。

You can also confirm your specific project Platform, by looking for the project name in the same window and the Platform that is applied to it. 您还可以通过在同一窗口中查找项目名称以及应用于该平台的平台来确认您的特定项目平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM