Bug 21867 – DMD fails to link after installing Visual Studio 2019

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2021-04-27T08:32:54Z
Last change time
2022-12-27T17:09:14Z
Assigned to
No Owner
Creator
Juraj

Comments

Comment #0 by zero — 2021-04-27T08:32:54Z
DMD fails to link after installing Visual Studio 2019 Community (installing only .NET components). To clarify, I used dmd without VS before and I had no issue. To reproduce on my machine I just need to create empty folder c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC lld-link: error: could not open 'libcmt.lib': no such file or directory Error: linker exited with status 1 Removing the folder fixes the issue. LDC does not have this problem and it links fine. dmd --version DMD64 D Compiler v2.096.1-dirty Output of dmd -v: With the folder (linking fails with above error) c:\D\dmd2\windows\bin64\lld-link.exe /NOLOGO "app.obj" /OUT:"app.exe" /DEFAULTLIB:phobos64 /DEBUG /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\lib\amd64" /LIBPATH:"C:\D\dmd2\windows\bin\..\lib64\mingw" And without (links fine) c:\D\dmd2\windows\bin64\lld-link.exe /NOLOGO "app.obj" /OUT:"app.exe" /DEFAULTLIB:phobos64 /DEBUG /LIBPATH:"c:\D\dmd2\windows\bin64\..\lib64\mingw"
Comment #1 by ibuclaw — 2022-12-27T17:09:14Z
*** This issue has been marked as a duplicate of issue 19760 ***