Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: sasq on May 02, 2006, 11:30:01 pm
-
Hello.
Is it possible to compile Win32 GUI apps [using Win32 API] with GCC under Linux?
If yes, how to do it?
I mean, how to install Win32 SDK headers/libs and where to make it possible for GCC to use it with C::B?
Can I use that Win32SDK package for MinGW ? Or maybe there is a special package for GCC/Linux?
I've tried to add paths to my MinGW include dir on Windows partition under C::B compiler options, but I've got some strange errors [maaany of them! :/ ].
-
The MinGW website would be the obvious place to look. I found this (http://www.mingw.org/mingwfaq.shtml#faq-cross) without even hitting Google...
-
This is not easy, but it is possible using at least two different approaches.
First, gcc can be configured as a cross-compiler and as such, it can generate Windows applications from Linux. Don't ask me how to set up cross-compiling though, I wish I knew (I'd use it the other way around if I did).
Second, there is a gcc drop-in replacement which runs the compiler on a different machine via ssh. I forgot its name, but it is hosted on Sourceforge, should be easy enough to find under "compilers".
That way, you need another PC (or a virtual machine running on the same PC) with Windows installed, and you can compile Windows applications natively, doing the actual work from Linux, though. It is a bit less elegant than cross-compiling, but it surely needs less setup.
-
look winelib (http://www.winehq.org/site/docs/winelib-guide/winelib-introduction#WINELIB-WHATIS)
-
Hello,
Look at here:
http://forums.codeblocks.org/index.php?topic=2688.0
Best wishes,
Michael
-
look winelib (http://www.winehq.org/site/docs/winelib-guide/winelib-introduction#WINELIB-WHATIS)
Right, Wine is a third solution, and probably the best of all.
That way, you can just run MinGW under Linux and don't need to worry about anything. :)
-
From the website of MinGW: http://mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux (http://mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux)