是否有可能编译在Ubuntu下一个32位系统中的64位可执行文件? [英] Is it possible to compile a 64 bit executable on a 32 bit system under Ubuntu?

查看:297
本文介绍了是否有可能编译在Ubuntu下一个32位系统中的64位可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

和,如果可能的话,可以请你点我一个这样的例子?谢谢!

And, if it is possible, can you please point me to an example of this? Thanks!

推荐答案

您正在寻找的是交叉编译。 http://en.wikipedia.org/wiki/Cross_compiler#GCC_and_cr​​oss_compilation

What you are looking for is cross compilation. http://en.wikipedia.org/wiki/Cross_compiler#GCC_and_cross_compilation

正如托马斯说,你需要安装并假设你正在使用gcc,你需要使用-b机选项,可能是一些其他选项也(GCC的人,花了很多目标机器的库时间阅读!)。

As Tomas said, you need the libs of the target machine installed and assuming you are using gcc you will need to use the "-b machine" option, and probably a few other options also (man gcc, and spend a lot of time reading!).

这可以是一个真正的痛苦,以获得正确的,所以我会问是否真的有必要吗?

This can be a real pain to get right, so i would ask whether it is really necessary?

这篇关于是否有可能编译在Ubuntu下一个32位系统中的64位可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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