www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Error: Could not open 'libcmt.lib'

reply Willem <willem matimba.com> writes:
Just starting out new with D.  Up until now I have been using 
Python and a bit of OCaml.

Error when linking: "lld-link: error: could not open 
'libcmt.lib': no such file or directory"

What I did:  I installed the complete D setup in my Windows 10 PC 
-- including VS 2019.

 From the command line "C:\D\dmd2vars64.bat" I was able to 
creating a simple program with "dub init hello"

When executing it with "dub run hello" I get following error:

"lld-link: error: could not open 'libcmt.lib': no such file or 
directory"

However -- running "dub run --arch=x86" did work

dmd --version
DMD64 D Compiler v2.098.0-dirty

dub --version
DUB version 1.27.0, built on Oct 10 2021

Searching the forum it appear to be related to MS runtimes... but 
I have not yet been able to resolve it. Any suggestions would be 
greatly appreciated.

Many Thanks.
Oct 25 2021
next sibling parent reply Willem <willem matimba.com> writes:
I was able to resolve above issues by following the install guide 
by DrIggy  

https://www.youtube.com/watch?v=fuJBj_tgsR8

Thanks for posting it.
Willem
Oct 25 2021
parent reply Dr Machine Code <jckj33 gmail.com> writes:
On Monday, 25 October 2021 at 15:43:06 UTC, Willem wrote:
 I was able to resolve above issues by following the install 
 guide by DrIggy  

 https://www.youtube.com/watch?v=fuJBj_tgsR8

 Thanks for posting it.
 Willem
A friend of mine was with this issue. We just end up using ldc2 but would be nice to know the actual fix for dub with dmd
Oct 25 2021
parent Willem <willem matimba.com> writes:
On Monday, 25 October 2021 at 20:00:06 UTC, Dr Machine Code wrote:
 On Monday, 25 October 2021 at 15:43:06 UTC, Willem wrote:
 I was able to resolve above issues by following the install 
 guide by DrIggy  

 https://www.youtube.com/watch?v=fuJBj_tgsR8

 Thanks for posting it.
 Willem
A friend of mine was with this issue. We just end up using ldc2 but would be nice to know the actual fix for dub with dmd
I suspect my initial issue was related to the Visual Studio 2019 installation. I didn't install the "Desktop development with C++" components the first time round. See 1m35sec in video link provided.
Oct 26 2021
prev sibling parent bauss <jj_1337 live.dk> writes:
On Monday, 25 October 2021 at 14:43:06 UTC, Willem wrote:
 Just starting out new with D.  Up until now I have been using 
 Python and a bit of OCaml.

 Error when linking: "lld-link: error: could not open 
 'libcmt.lib': no such file or directory"

 What I did:  I installed the complete D setup in my Windows 10 
 PC -- including VS 2019.

 From the command line "C:\D\dmd2vars64.bat" I was able to 
 creating a simple program with "dub init hello"

 When executing it with "dub run hello" I get following error:

 "lld-link: error: could not open 'libcmt.lib': no such file or 
 directory"

 However -- running "dub run --arch=x86" did work

 dmd --version
 DMD64 D Compiler v2.098.0-dirty

 dub --version
 DUB version 1.27.0, built on Oct 10 2021

 Searching the forum it appear to be related to MS runtimes... 
 but I have not yet been able to resolve it. Any suggestions 
 would be greatly appreciated.

 Many Thanks.
C++ runtime needs to be installed I believe.
Oct 27 2021