I am worried about the reliability of the MinGW compiler for 64-bit, as an alternative to the Visual C++ compiler.
For example, assuming C++ code builds and runs perfectly under Linux using GCC 4.6.2, will the corresponding MinGW produce similarly reliable executables/libraries under 64-bit Windows?
Is Cygwin a better option in terms of reliablity? Is neither to the Visual C++ compiler?
First, some misconceptions:
MinGW(.org) does not provide a 64-bit version of its runtime. MinGW-w64 does, in addition to their 32-bit CRT. They are also working on ARM support. And support various additional APIs (Win32 and others).
Cygwin <-> MinGW-w64: Cygwin does not use the MS CRT (msvcrt.dll). It instead inserts a POSIX compatibility layer in between your Cygwin app and the system's OS libraries (kernel32.dll, ntdll.dll, etc.), namely cygwin1.dll.
On to the question then...
I have found the MinGW-w64 compilers very good, and GCC 4.6 and above (actually, 4.5.1 and above) are very capable of producing good 64-bit code for Windows. Please remember that MinGW provides essentially the same C API as msvcrt.dll, so go to msdn.com for documentation (and be sure to look at the "MSVC++ 2003" version of documentation, some functions differ with the newer runtimes), do not think that because it's GCC, glibc documentation suddenly applies to Windows. Your code will have to be cross-platform. Also note that sizeof(long)!=sizeof(T*)
on x64 Windows. A commonly encountered error when porting *nix or x86 Windows code to x64 Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With