News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiling Win32 apps in C:B + GCC under Linux

Started by sasq, May 02, 2006, 11:30:01 PM

Previous topic - Next topic

sasq

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! :/ ].

TDragon

The MinGW website would be the obvious place to look. I found this without even hitting Google...
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

thomas

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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

bluekid

What is blue ? Blue is the invisible becoming visible.

Michael

[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

thomas

Quote from: bluekid on May 03, 2006, 07:34:38 AM
look winelib
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. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

David Perfors

OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring