本文介绍了在Ubuntu Linux中从Eclipse交叉编译Windows应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个编程环境,从Ubuntu Linux编译Windows可执行文件和库。我已经安装了MinGW(从官方的Ubuntu存储库),它从命令行工作得很好;但是,我尝试从Eclipse中使用它,它也不会自动检测到它,也不能似乎找到一种方法来使其工作。

I am trying to set up a programming environment to compile Windows executables and libraries from Ubuntu Linux. I have installed MinGW (from the official Ubuntu repositories) and it is working great from the command line; however, I try to use it from within Eclipse, and it neither detects it automatically nor can I seem to find a way to make it work manually.

所以,我的问题是,如何设置Eclipse来交叉编译Windows应用程序,最好使用MinGW(尽管其他替代解决方案也是受欢迎的)?

So, my question is, how can I set up Eclipse to cross-compile Windows applications, preferably using MinGW (although other, alternative solutions are welcome too)?

推荐答案

我使用Eclipse Indigo(3.7)与MacOSX上的CDT包交叉编译Windows应用程序,它的工作正常。只是为了引用别人的兴趣,我用安装mingw端口安装i386-mingw32-gcc -universal
在CDT中,创建新的C或C ++项目,在向导的下一页,选择项目类型为交叉编译项目,工具链 - 跨GCC。在下一页上,键入工具命令前缀(我有 i386-mingw32 - ),并提供mingw工具的路径。

I used Eclipse Indigo (3.7) with CDT package on MacOSX to cross-compile Windows apps and it works fine. Just for a reference to others interested, I installed mingw with port install i386-mingw32-gcc -universal.In CDT, create new C or C++ project, on the next page of the wizard, select Project Type as "Cross-Compile Project", toolchain - "Cross GCC". On the next page, type Tool Command Prefix (I have i386-mingw32-) and provide a path to mingw tools.

完成向导,添加您的文件并构建!

Complete the wizard, add your files and build!

干杯,
最高

这篇关于在Ubuntu Linux中从Eclipse交叉编译Windows应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 19:26