Page 1 of 1

Any specific reason to choose MinGW over VC++ on Windows ?

Posted: Fri Dec 09, 2011 3:00 am
by Mind Calamity
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.

Share your opinions guys! :)

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 10:35 am
by jacmoe
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).

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 12:15 pm
by CABAListic
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.

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 12:21 pm
by jacmoe
Requiring C99 support is not cross platform.
But good points.

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 2:41 pm
by jacmoe
And Open Source Fanatics using Windows ?
Totally oxymoronic. :lol:

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 2:50 pm
by Kojack
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.

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 5:24 pm
by Klaim
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.

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 5:45 pm
by CABAListic
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.

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 9:15 pm
by Klaim
Cabalistic wrote:But only because Microsoft has (again) decided to forsake support of an existing standard...
AFAIK, no C++ standard is based on C99, isn't it?

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 9:30 pm
by CABAListic
Yeah, C++ is not affected. It's entirely a C issue. Which is why it doesn't really concern me :)

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Fri Dec 09, 2011 10:35 pm
by Kojack
Mingw/gcc/clang have most of c99, but not all apparently.
http://en.wikipedia.org/wiki/C99
GCC:
As of July 2011 in mainline GCC, 43 features have been completely implemented (12 suffer library issues), 1 feature is broken and 6 are missing.
Clang:
Does not support C99 floating-point pragmas.
There are compilers with better support for C99 (such as IBM C and Sun Studio).

Re: Any specific reason to choose MinGW over VC++ on Windows

Posted: Sun Dec 11, 2011 12:32 am
by Klaim
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.