如果我将我的应用程序从32位升级到64位,我应该做出哪些更改 [英] what changes should i make if i upgrade my application from 32 bit to 64 bit

查看:782
本文介绍了如果我将我的应用程序从32位升级到64位,我应该做出哪些更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





目前我正在运行32位应用程序,如果我想升级到64位,我应该在我的应用程序中进行哪些更改。< br $> b $ b





问候,

Ranjith

解决方案

这是谷歌提供的很多提示之一:

在64位平台上移植C ++代码的20个问题 [ ^ ]

让编译器为你工作,并将任何警告解释为错误:)



当然,没有任何错误可以被警告,例如:

  void  f( void  * p)
{
DWORD dwAddress((DWORD)p); // 会在没有任何警告的情况下将值降低到较低的部分:)
// DWORD_PTR dwAddress(reinterpret_cast< dword_ptr>(p)); //正确:改编后的类型正在使用
cout<< dwAddress;
}< / dword_ptr>


对于MFC应用程序,



转到配置管理器并将设置更改为win32到x64。





Framework可以将32位应用程序转换为64位应用程序。

Hi ,

Currently i am running an application in 32 bit and if i want to upgrade to 64 bit, what changes should i make in my application.



Regards,
Ranjith

解决方案

This is one of a lot of tips available on google:
20 issues of porting C++ code on the 64-bit platform[^]


Let the compiler work for you and interpret any warning as error :)

Of course, not any error can be warned, for example:

void f(void* p)
{
  DWORD dwAddress((DWORD) p); // would cut the value to its low part without any warning :)
  // DWORD_PTR dwAddress(reinterpret_cast<dword_ptr>(p)); // correct: the adapted type is using
  cout << dwAddress;
}</dword_ptr>


For MFC application,

go to configuration manager and change the setting to win32 to x64.


Framework can take care of converting 32bit application to 64 bit application.


这篇关于如果我将我的应用程序从32位升级到64位,我应该做出哪些更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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