digitalmars.D - Compiling on windows
- frustrated (3/3) Jun 05 Why does dmd/ldc2 for windows use old mingw 8.0 libs?
- Richard (Rikki) Andrew Cattermole (10/12) Jun 05 Nobody has needed it to be updated.
- frustrated (18/32) Jun 05 I’ve been experimenting with LDC2 on Windows for a while, and one
- Richard (Rikki) Andrew Cattermole (7/14) Jun 05 You know, you can ship the import libraries yourself.
- Adam D. Ruppe (13/18) Jun 06 I see that uses .a files and we want .lib files.... the .libs
- Kapendev (3/6) Jun 05 Welcome to Windows.
- Guillaume Piolat (3/6) Jun 06 I usually point interns and new staff to:
- Mike Parker (3/5) Jun 06 For the same reason it's dependent on gcc on Linux and clang/gcc
- Adam D. Ruppe (12/15) Jun 06 There's no good reason for this, and opend ripped most that
- Walter Bright (2/4) Jun 07 So it can link with msvc generated object files.
Why does dmd/ldc2 for windows use old mingw 8.0 libs? Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?
Jun 05
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#L42Why 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.
Jun 05
On Saturday, 6 June 2026 at 04:52:13 UTC, Richard (Rikki) Andrew Cattermole wrote:On 06/06/2026 4:32 PM, frustrated wrote: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?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#L42Why 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.
Jun 05
On 06/06/2026 5:18 PM, frustrated wrote: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.You know, you can ship the import libraries yourself. Point the linker at them, either the file itself or the directory and it'll use them, you don't need to rely on the compiler to ship them. You are not blocked.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?I have no desire to do a PR, feel free. Ldc should update if dmd updates, however I can't find where to do it.
Jun 05
On Saturday, 6 June 2026 at 05:18:56 UTC, frustrated wrote: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)I see that uses .a files and we want .lib files.... the .libs that come with ldc (and opend) come from here: https://github.com/ldc-developers/mingw-w64-libs/ and there's an update script that hasn't been run for ages...... last update 2018?! golly i just tried running it again against the newest mingw-64 release and it needed some minor fixes but i think i got it done. Any chance you could send me a smallish (i'll prolly have to port it to D unless you do that too) test program that uses some of the newer apis so i can try to build it with my opend-dev? the script ran successfully just now but that doesn't mean it generated actually usable output.
Jun 06
On Saturday, 6 June 2026 at 04:32:26 UTC, frustrated wrote:Why does dmd/ldc2 for windows use old mingw 8.0 libs? Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?Welcome to Windows. It's not too late to switch to Linux (preferably Ubuntu).
Jun 05
On Saturday, 6 June 2026 at 04:32:26 UTC, frustrated wrote:Why does dmd/ldc2 for windows use old mingw 8.0 libs? Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?I usually point interns and new staff to: https://p0nce.github.io/d-idioms/#Installing-Dlang-on-Windows
Jun 06
On Saturday, 6 June 2026 at 04:32:26 UTC, frustrated wrote:Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?For the same reason it's dependent on gcc on Linux and clang/gcc on Mac: it's the system toolset.
Jun 06
On Saturday, 6 June 2026 at 04:32:26 UTC, frustrated wrote:Why does dmd/ldc2 for windows use old mingw 8.0 libs?im lazy on this too but.....Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?There's no good reason for this, and opend ripped most that nonsense right out and is better for it. We use the ucrt by default so you don't have to mess with getting the msvcrt yourself, and it self-contains what it needs. I don't think we outright ignore msvc if it is present, so if you have it installed, it will try to use it, but tbh it probably should since it just adds inconsistency. But the opend package does work out of the box if you don't have it installed. This "system toolchain" party line is user-hostile nonsense. https://opendlang.org/index.html
Jun 06
On 6/5/2026 9:32 PM, frustrated wrote:Why does dmd/ldc2 for windows use old mingw 8.0 libs? Why is dmd/ldc2 for windows so dependent on msvc and the windows sdk?So it can link with msvc generated object files.
Jun 07









"Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> 