Yeah, the title pretty much sums it up, so, for what purpose would one choose MinGW over VC++ ?
I mean GCC/G++ are native to Linux/*nix, why would you need to use those compilers, except for assuring that the code is completely cross-platform and will compile out-of-the-box on every platform.
There is no reason at all to use MinGW instead of VC++.
Absolutely none.
The only thing I can think of as being a reason is if you are making use of a library which haven't been ported to Windows yet - most often due to it not being written in a cross platform way.
If you use VC++ on Windows and GCC on Linux, then your code is cross platform (or is quickly going to be).
If you use MinGW you are only creating an illusion, because at the end of the day it's not cross platform. It's posix/Linux/Unix on Windows. (D'oh).
/* Less noise. More signal. */ Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion. OgreAddons - the Ogre code suppository.
Really not too many reasons for a normal developer unless you are an Open Source fanatic.
There are a few for some special cases:
1. Cross-compilation from Unix is possible with MinGW, so you could build your Windows app from Linux.
2. MinGW has C99 support, Visual Studio does not. A few open source libraries require it and don't compile with Visual Studio as a consequence (most prominent example to my mind would be ffmpeg).
3. MinGW compilation times are probably slightly faster than Visual Studio, particularly the later versions of the latter. But this comes at the cost of increased binary sizes.
I used to use mingw, but only for arm coding on gameboy advance. I still used visual studio for the actual editing of the code.
Actually visual studio has had arm target support since 2005 (some windows mobile devices are arm based, like the dell axim which uses intel's xscale arm chip), but I've never heard of anybody trying it for gba development.
Mingw would be interesting if it had clang support. There's some really cool code analysis things clang lets you do, but I couldn't find a working windows build.
As recent versions of GCC provide more C++11 language features implementations than VS, for some bleeding edge code you might want to use GCC even on windows. There is a special MINGW version provided by I don't remember who that is always up to date with GCC.
jacmoe wrote:Requiring C99 support is not cross platform.
But good points.
But only because Microsoft has (again) decided to forsake support of an existing standard...
In any case, since I'm not doing any C development, this problem doesn't concern me personally, except that it rules out ffmpeg as a possible choice of video rendering library if I ever needed one.
Yeah, bigger issue being that CLang doesn't have a lambda implementation yet. If it had, you could use C++11 lambda, move semantic/r-value references, auto/decltype on GCC, CLang and VC. Now you can't because Microsoft focus on libraries first, GCC on language features first and CLang implement things as they can.