如何为所有Windows x86和x64 flatfrom设计软件! [英] how to design software for all Windows x86 and x64 flatfrom !

查看:113
本文介绍了如何为所有Windows x86和x64 flatfrom设计软件!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好兄弟。

我在Windows7 x64中设计了一个软件。

但是当我把它放到windows x86(windows 7和windows xp)时

它在下面的图片中显示错误



http://imageshack.com/a/img31/1282/dxe4.png [ ^ ]



ps:我设置了Microsoft Visual C ++ 2008 SP1可再发行组件包(x86) )



你有什么方法可以运行所有x64和x86 flatfrom的软件吗?

解决方案

使用C ++或任何其他本机代码技术,开发在不同平台上运行的软件的唯一方法是为每个受支持的指令集架构开发单独的版本。另请注意,没有一个64位架构。有x86-64和IE64(Itanium)。彼此不同且不相容:

http://en.wikipedia.org/wiki/X86 [ ^ ],

http://en.wikipedia.org/wiki/X86-64 [ ^ ],

http://en.wikipedia.org/wiki/Itanium [ ^ ]。



同时,您可以将所有代码编译为x86-32。它将与所有系统兼容,并将在Windows下的WoW64下运行:

http:// en .wikipedia.org / wiki / WoW64 [ ^ ] 。



在同一进程中加载​​的所有软件组件都应编译为相同的体系结构;即使它们中的每一个都与目标系统兼容,也无法组合。



如果您为要支持的体系结构开发所有软件组件的单独版本如果您愿意,您可以将其集成到一个与架构无关的程序包中。例如,您可以创建一个编译为x86-32的启动模块(在64位平台上的WoW64上执行)。它可以检测目标CPU架构,并使用为此架构精确编译的可执行模块启动应用程序进程。



这是关于本机代码架构。如果你想使用.NET开发(你可以使用C ++的C ++ / CLI方言,在ECMA-327下标准化),你可以使用名为AnyCPU的目标伪架构。这种架构是可行的,因为您将代码编译为IL代码,IL代码还使用 JIT编译编译为CPU指令。请参阅:

http://en.wikipedia.org/wiki/C %2B%2B / CLI [ ^ ],

http://www.ecma-international .org / publications / standards / Ecma-372.htm [ ^ ],

http:// en .wikipedia.org / wiki / Just-in-time_compilation [ ^ ],

http://en.wikipedia.org/wiki/Common_Language_Infrastructure [ ^ ],
http://en.wikipedia.org/wiki/Common_Language_Runtime [ ^ ]。



< DD> -SA

Hi bro.
I'm design a software in Windows7 x64.
But when I'm copping it to windows x86 (windows 7, and windows xp)
It thow the error in the picture below

http://imageshack.com/a/img31/1282/dxe4.png[^]

ps: I was setup the Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

Do you have any way to software can run for all x64 and x86 flatfrom ?

解决方案

With C++ or any other native-code technology, the only way to develop software which runs on different platforms would be development of separate versions for each of the supported instruction-set architectures. Also, note that there is no a single 64-bit architecture. There are x86-64 and IE64 (Itanium). There are different and incompatible with each other:
http://en.wikipedia.org/wiki/X86[^],
http://en.wikipedia.org/wiki/X86-64[^],
http://en.wikipedia.org/wiki/Itanium[^].

At the same time, you can compile all code to x86-32. It will be compatible with all the systems and will be run under WoW64 on Windows:
http://en.wikipedia.org/wiki/WoW64[^].

All software components loaded in the same process should be compiled to the same architecture; you cannot combine then even if each of them separately is compatible with the target system.

If you develop separate versions of all the software component for the architectures you want to support, if you want, you can integrate then in a single package that would behave as architecture-agnostic. For example, you can create a startup module compiled to x86-32 (to be executed on WoW64 on 64-bit platform). It can detect the target CPU architecture and start the application process using executable module(s) compiled exactly for this architecture.

That was about native-code architecture. If you want to develop using .NET (you could do it using C++/CLI dialect of C++, which is standardized under ECMA-327), you can use the target "pseudo-architecture" called "AnyCPU". Such architecture is possible because you compile the code into IL code, which is additionally compiled to CPU instructions using JIT compilation. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://en.wikipedia.org/wiki/Just-in-time_compilation[^],
http://en.wikipedia.org/wiki/Common_Language_Infrastructure[^],
http://en.wikipedia.org/wiki/Common_Language_Runtime[^].

—SA


这篇关于如何为所有Windows x86和x64 flatfrom设计软件!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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