Visual Studio C ++应用程序从32位到64位的可移植性 [英] portability of a Visual Studio C++ application from 32 bit to 64 bit

查看:236
本文介绍了Visual Studio C ++应用程序从32位到64位的可移植性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

 

我已经用VS2008中的C ++代码编译并构建了.exe.所有操作都在使用32位VS2008的32位PC上完成.我想移植相同的exe文件并在64位计算机上运行它.那怎么办?我可以强迫它在64位模式下运行吗?我把 文件是sysWOW64文件夹中的文件,因为它是32位系统文件文件夹.位,仍然不起作用.请对此提供建议.

I have compiled and built a .exe from a C++ code in VS2008. This is all done on a32 bit PC using 32 bit VS2008. I wanted to port the same exe file and run it ona 64 bity machine. How can that be done? Can I force it to run in the 64 bit mode? I dumped the file in the sysWOW64 folder as it is the 32 bit system files folder. Bit ,still does not work. Kindly advice me on this please.

 

此致

Vinod.

 

 

推荐答案

您可以将自己的应用程序构建为本机64位(x64)应用程序.

You can build your applciation as native 64 bit (x64) application.

如果要将应用程序编译为x64目标,则应确保已安装VS2008的所有64位部分,甚至x64库.

If you want to compile your application as x64 target you should be sure all 64 bit parts of VS2008 are installed, even the x64 libraries.

要将x64目标添加到您的项目工作区,请打开配置管理器,如果您单击"Win32",则可以找到它.在组合框中,然后向下滚动到配置管理器".

To add a x64 target to your project workspace please open the configuration manager, this can be found if you click the "Win32" in the combobox and scroll down to "configuration manager".

现在您可以将新平台添加到您的项目解决方案中.单击活动解决方案平台",然后单击确定".组合框.比单击新" itme.现在,您可以插入一个新的目标平台. x64应该是您所需要的.

now you can add a new plattform to your project solution. Click the "Active solution plattform" combobox. Than click the itme "new". Now you can insert a new target plattform. x64 should be the one you need.

如果您现在从"Win32"更改目标平台,则到"x64"您执行64位构建.可能需要对代码进行一些更改.一些数据类型和其他一些东西的处理方式略有不同.但这不是一个大问题.

If you change the target plattform now from "Win32" to "x64" you do a 64 bit build. It may be possible to make a few changes your code. Some data types and a few other things are handled a little different. But that should not be a large problem.


这篇关于Visual Studio C ++应用程序从32位到64位的可移植性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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