Compilation on 64-bit system for 32 bit system - compatibility

梦想的初衷 提交于 2019-12-09 17:48:31

问题


i have a 64-bit machine with 64-bit OS...

how can i compile programs with Visual Studio 2010 so that they work on 32-bit system

if i install 32-bit OS on my 64-bit machine than i thinks it won't be a problem


回答1:


If you are talking about .NET applications simply verify that you are targeting x86 in the properties of your project (this is the default setting) or Any CPU:




回答2:


This is a nice property of just-in-time compiled code. It runs just as well on a 32-bit machine (using the x86 jitter) as a 64-bit machine (x64 jitter). The only time you get in trouble is when you need to use legacy unmanaged code that's only available as 32-bit machine code. Not uncommon with old dbase providers (like Jet) and COM servers. You've got the right kind of machine to detect these problems early.

Emphasizing: you don't have a problem if the target machine is 32-bit, only if it is a 64-bit machine.



来源:https://stackoverflow.com/questions/5050695/compilation-on-64-bit-system-for-32-bit-system-compatibility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!