Thread overview
Windows development: MinGW64 or MSVC ?
Feb 23, 2015
Johan Engelen
Feb 24, 2015
Kagamin
Feb 24, 2015
Benjamin Thaut
Feb 26, 2015
kinke
Feb 26, 2015
Johan Engelen
February 23, 2015
I've successfully built LDC using MinGW64 for x86_64 [1], and can
now execute a simple Hello World program. My patches to LDC's
druntime were very quickly merged, thanks Kai!

Unfortunately, many tests fail because of missing symbols when
linking. To fix this, I'd have to make more changes to druntime
(I fear that a lot of small patch ups are required), adding
special cases for MinGW/Windows. I'm wondering if I am doing
something that is pretty useless...
It seems to me that druntime assumes MSVC everywhere, and I do
not know if MinGW support is desired. For example, in
druntime/src/core/stdc/fenv.d the fenv_t struct defined for
Windows is completely different from the one in MinGW32 and
MinGW64's header files; I guess that means that no-one is using
MinGW?

I no longer know why I do not just use MSVC to build LDC. [2]
Is there a good reason one would use MinGW64 over MSVC? :)

Thanks for your comments,
   Johan


[1]
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-posix/seh/x86_64-4.9.2-release-posix-seh-rt_v3-rev1.7z

[2] I come from Inkscape development. For Inkscape, we provide
pre-built binaries on Windows, so one can get going really
quickly without the pains of compiling all dependencies (a lot).
These binaries are compiled using... MinGW, hence so far I have
only used MinGW and not MSVC.
February 24, 2015
AFAIK, mingw is just a compiler, linker and headers, it uses msvc libraries too. It has its own libraries too, but only if you really need them.
February 24, 2015
I personally think that putting time into the MSVC target would be better invested. Using the MSVC toolchain you have a much better tooling, especially debugging and profiling. There are a lot of tools which expect you to put out pdb debugging information and mingw does not do that. Also personally I don't know anyone who uses mingw on windows. Usually mingw is only used if some open source project also wants to support windows but has no "real" Windows developers. Everyone I know who makes money with software development on windows uses Visual Studio and MSVC.
February 26, 2015
> I personally think that putting time into the MSVC target would be better invested. Using the MSVC toolchain you have a much better tooling, especially debugging and profiling. There are a lot of tools which expect you to put out pdb debugging information and mingw does not do that. Also personally I don't know anyone who uses mingw on windows. Usually mingw is only used if some open source project also wants to support windows but has no "real" Windows developers. Everyone I know who makes money with software development on windows uses Visual Studio and MSVC.

I fully agree.

I'm also keen on getting LDC to support Win64, but I'm focusing entirely on MSVCRT 12+ (VS 2013+). In addition to the advantages of the MS toolchain on Windows mentioned by Benjamin, Microsoft have also vastly improved their C99 support in their latest runtimes so that the C99 MinGW-w64 C-runtime layer is often rendered obsolete (e.g., math.h, fenv.h). MSVCRT 14 (VS 2015) will improve C99 conformance in stdio.h, another important step.

The DMD guys still need to be motivated (note that LLVM has recently dropped support for VS < 2013):
https://github.com/D-Programming-Language/druntime/pulls/kinke
February 26, 2015
OK, thanks for the feedback. I will use MSVC then :)