Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-compiling Windows applications from Eclipse in Ubuntu Linux?

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.

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)?

like image 744
Frxstrem Avatar asked Jul 08 '11 23:07

Frxstrem


1 Answers

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!

Cheers, Max

like image 99
Max Avatar answered Sep 28 '22 18:09

Max