Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Mingw exist?

Tags:

gcc

mingw

MSYS and UNIX-like build systems apart; why does Mingw exist? What I mean is, why isn't win32/64 just another target available in "vanilla GCC"? Are there technical reasons for this or are they "political"? It would seem to me that there isn't really anything special about the Windows platform that would make a GCC port to it "incompatible" with the original GCC.

like image 964
David Nordvall Avatar asked Aug 17 '09 10:08

David Nordvall


2 Answers

Mingw isn't just the compilers - it's also the libraries and headers (and whatever other support files you might need).

GCC is just a compiler. Mingw is a full environment.

like image 139
Matthew Iselin Avatar answered Oct 05 '22 10:10

Matthew Iselin


MingW is intended to allow easy porting of Posix apps to windows. It's simply a "thinner" layer than CygWin, so not everything might work where windows too different. CygWin allows provides enough insulation that even the scripting tools to build and generate code run.

Edit: Microsoft is very fond of making there own standards, and want to put there own brand on things for which open standards already exist. i.e. OpenGL -> DirectX, Java -> .net, OpenCL is the next standard they want to spurn. This makes them a bit of a pain for non sponsored project to support them as a target. They have always turned away from anything that allows easy cross platform development, because they only want you to develop your app for there OS. It's a marketing strategy, control the brand, control the platform, and make it painful for people to support other OSes. MingW is required because GCC can generate x86 code, but even the most basic runtime support is different than Posix based OSes.

like image 29
NoMoreZealots Avatar answered Oct 05 '22 10:10

NoMoreZealots