Re: Error: Could not open 'libcmt.lib'
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.
Re: Error: Could not open 'libcmt.lib'
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.
Re: Error: Could not open 'libcmt.lib'
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
Re: Error: Could not open 'libcmt.lib'
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
Error: Could not open 'libcmt.lib'
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.
Re: [GTK-D] dub run leads to lld-link: error: could not open libcmt.lib: no such file or directory
On Tuesday, 26 May 2020 at 15:18:42 UTC, jmh530 wrote: On Tuesday, 26 May 2020 at 15:16:25 UTC, jmh530 wrote: [snip] Another short-term fix might be to try compiling with the -m32 dflag (need to put in your dub.sdl/json). Sorry, easier is dub test --arch=x86 You may also have to make sure that bin64 is in the path. https://dlang.org/changelog/2.091.0.html#windows
Re: [GTK-D] dub run leads to lld-link: error: could not open libcmt.lib: no such file or directory
On Wednesday, 13 May 2020 at 15:26:48 UTC, BoQsc wrote: [snip] Linking... lld-link: error: could not open libcmt.lib: no such file or directory lld-link: error: could not open OLDNAMES.lib: no such file or directory Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. I just ran into this issue as well. I haven't had a chance to fix it on my end, but this is what I've found. This line Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64. means that it is compiling a 64bit program on Windows. On Windows, if you are trying to compile a 64bit program, then it will try to link with lld if it cannot find a Microsoft linker [1]. The failure is likely due your Microsoft linker (or lld) either not being installed properly or wrong version or configured improperly. If you don't have Visual Studio Community installed, that might be a first step. Another short-term fix might be to try compiling with the -m32 dflag (need to put in your dub.sdl/json). [1] https://dlang.org/dmd-windows.html#linking
Re: [GTK-D] dub run leads to lld-link: error: could not open libcmt.lib: no such file or directory
On Tuesday, 26 May 2020 at 15:16:25 UTC, jmh530 wrote: [snip] Another short-term fix might be to try compiling with the -m32 dflag (need to put in your dub.sdl/json). Sorry, easier is dub test --arch=x86
[GTK-D] dub run leads to lld-link: error: could not open libcmt.lib: no such file or directory
A simple example I tried to run. #!/usr/bin/env dub /+ dub.sdl: name "hello" dependency "gtk-d" version="~>3.9.0" +/ import gtk.MainWindow; import gtk.Label; import gtk.Main; void main(string[] args) { Main.init(args); MainWindow win = new MainWindow("Hello World"); win.setDefaultSize(200, 100); win.add(new Label("Hello World")); win.showAll(); Main.run(); } This is how I tried to run it. C:\Users\vaida\Desktop\Command prompt shell>dub run --single gui.d Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64. gtk-d:gtkd 3.9.0: target for configuration "library" is up to date. gtk-d:gstreamer 3.9.0: target for configuration "library" is up to date. gtk-d:peas 3.9.0: target for configuration "library" is up to date. gtk-d:sv 3.9.0: target for configuration "library" is up to date. gtk-d:vte 3.9.0: target for configuration "library" is up to date. hello ~master: building configuration "application"... Linking... lld-link: error: could not open libcmt.lib: no such file or directory lld-link: error: could not open OLDNAMES.lib: no such file or directory Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
Re: "lld-link: error: could not open libcmt.lib: no such file or directory"
in case anyone else suffers from this in the future and is looking for a solution - redownloading visual studio 2017 and making sure the c++ workload was enabled fixed this for me. i'm not really sure why that worked, but i'm just happy to be able to learn again. trans rights! - moth
"lld-link: error: could not open libcmt.lib: no such file or directory"
hi all! after a long while away, i thought i'd download the latest D release and give learning it another shot. unfortunately, it looks like i screwed up somewhere big time =[ it was working fine for me before [a few months ago i think], but now whenever i try to compile i get the message "lld-link: error: could not open libcmt.lib: no such file or directory". sometimes, depending on what i'm trying to compile, it complains it can't find "OLDNAMES.lib" as well. i thought it was just that i had installed D wrong at first, but i've uninstalled / reinstalled a dozen times now and it's still not working. could i really have deleted whatever it's looking for somehow? i really want to be able to program in D, but i'm at my wit's end... please help! =[ - moth