From Devpit
Jump to: navigation, search

About MinGW

Many Linux/Unix applications are build using GNU Toolchain. Moreover, many developer tools for these applications were designed in assumption that GNU utilities are installed on developers' machine. Everything works fine until you decide to port such application to Windows platform. The problem is that not only the utilities are absent on Windows, but there are also significant differences on platform level.

To port Linux/Unix application to Windows you would have to either abandon your build system or to port your build system to this platform. Latter is just what MinGW is - Minimal GNU (toolchain) for Windows. But it's not only that.

Linux vs. Windows: Cygwin

Porting just the toolchain to platform was not enough to make Linux applications run. Platform differences were rather huge and amount of code to be rewritten for each application was quite significant to think about a workaround. The decision was carried to make a library, which will transparently convert calls to Linux subsystem from an application to calls to Windows API. This library and a project behind has been called Cygwin.

"How is that related to MinGW?", you may ask. The approach Cygwin took required applications to link against Cygwin DLL, but even that was not enough to make the porting process seamless. Many programs relied on hardwired paths in Linux subsystem, were there no analogue on Windows and the need for additional path translation was born. Some software abused shell scripts even more than aforementioned build system, so Cygwin project has to provide compiled versions of a shell and utilites. Finally Cygwin had grown-up into the big Unix shell subsystem for Windows. And even after that not many programs could run on Cygwin without modifications to source code.