Thread overview
Error: Could not open 'libcmt.lib'
Oct 25, 2021
Willem
Oct 25, 2021
Willem
Oct 25, 2021
Dr Machine Code
Oct 26, 2021
Willem
Oct 27, 2021
bauss
October 25, 2021

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.

October 25, 2021

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

October 25, 2021

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

October 26, 2021

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.

October 27, 2021

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.