[Issue 21867] New: DMD fails to link after installing Visual Studio 2019
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 27 08:32:54 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21867
Issue ID: 21867
Summary: DMD fails to link after installing Visual Studio 2019
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: zero at vec4.xyz
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"
--
More information about the Digitalmars-d-bugs
mailing list