如何制作一个可以在64位和32位系统中运行的Windows应用程序 [英] how to make a windows application which can run in both 64 bit and 32 bit system

查看:159
本文介绍了如何制作一个可以在64位和32位系统中运行的Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何制作可以在64位和32位系统上运行的Windows窗体应用程序。

到目前为止,我使用32位系统制作的Windows窗体应用程序在64位上运行创建一个x86文件。但我想知道可以做些什么来使该应用程序在32位或64位的任何系统上运行。

How can I make a windows Form application which can run on both 64 bit and 32 bit system.
Till now I used a Windows form application made in 32 bit system to run on 64 bit by creating a x86 file. But I want to know that what can be done to make that application to run on any system either 32 bit or 64 bit.

推荐答案

请记住,你不能混用32-同一进程中的64位代码。这意味着如果您使用的是仅32位的外部控件和库,那么您的应用程序也必须只有32位。
Keep in mind that you cannot mix 32- adn 64-bit code in the same process. This means that if you're using external controls and libraries that are 32-bit only, your application must also be 32-bit only.


32位应用程序将完美地运行在64位机器,所以你实际上并不需要改变一些东西。如果您确实希望应用程序在64位计算机上作为64位应用程序运行,请按照以下步骤操作:

A 32-bit application will perfectly run on a 64-bit machine, so you actually don't really need to change something. If you really want that the application runs as a 64-bit appliction on a 64-bit machine, then follow these steps:


  1. 在Visual中Studio,转到Properties-> Build
  2. 选择任何CPU作为平台目标


先生根据我的经验任何CPU 在所有电脑中都不起作用。而是像这样使用它: -



在Visual Studio中,转到属性 - >选择 X86 平台目标。
sir as per my experience Any CPU doesn't work in all pc's. Instead use it like this :-

In Visual Studio, go to Properties->Select X86 Platform target.


这篇关于如何制作一个可以在64位和32位系统中运行的Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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