Compiling on windows

frustrated jilefe6760 at 5nek.com
Sat Jun 6 05:18:56 UTC 2026


On Saturday, 6 June 2026 at 04:52:13 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> On 06/06/2026 4:32 PM, frustrated wrote:
>> Why does dmd/ldc2 for windows use old mingw 8.0 libs?
>
> Nobody has needed it to be updated.
>
> Most of WinAPI was added as of Windows 2000.
>
> Here is where to update it: 
> https://github.com/dlang/installer/blob/f733556b660fd7255b2155ae4e03069184973ba6/.github/workflows/build_windows.yml#L42
>
>> Why is dmd/ldc2 for windows so dependent on msvc and the 
>> windows sdk?
>
> Because its the system tool chain.
>
> If you want to program a native program, you need the system 
> tool chain.
>
> We do support without both, except for ImportC but that 
> genuinely needs cl, and nobody has advanced supporting clang-cl 
> which needs a bit of work even if you have msvc installed.

I’ve been experimenting with LDC2 on Windows for a while, and one 
practical issue I keep running into is the outdated MinGW runtime 
it ships with.

For comparison, I’m using a modern MinGW toolchain (e.g. from 
mstorsjo’s clang builds) in C++, which includes up-to-date 
Windows libraries—things like windowsapp.lib, newer WinRT 
headers, etc. With that setup, I can build hybrid applications 
combining ImGui (DX11) with WinRT APIs (HTTP, XML), and 
everything works fine.

Trying to replicate a similar setup in D is currently not 
feasible, because the bundled MinGW is too old and lacks those 
newer libraries and APIs.

So this isn’t really about abstract “new APIs”, but about 
practical limitations when targeting modern Windows features. Is 
there any plan to update the MinGW toolchain or make it easier to 
use a newer one with LDC/DMD?


More information about the Digitalmars-d mailing list