When Visual Studio Community is the only version present on Windows 10, with the minimal set of options that satisfies the dmd installer (https://wiki.dlang.org/File:Visual_Studio_Installer.png) then dmd -m64 will fail to link:
LINK : fatal error LNK1104: cannot open file 'libucrt.lib'
Error: linker exited with status 1104
The problem goes away after changing UCRTVersion in C:\D\dmd2\windows\bin\sc.ini:
;UCRTVersion=winv6.3
UCRTVersion=10.0.10240.0
(Fresh dmd install.)
Comment #1 by Bastiaan — 2017-11-21T14:03:39Z
dmd-2.077.0
Comment #2 by Bastiaan — 2017-11-21T15:38:23Z
Use of the -m32mscoff option needs the same change under the [Environment32mscoff] section.
Comment #3 by robert.schadek — 2025-01-02T15:46:45Z