On Monday, 8 April 2019 at 14:49:02 UTC, Radu wrote:

Hi there,
Compiling with 2.085.1 on Windows 10 works with `dub --arch=x86_mscoff` LDC 1.15.0 works for x86/x86_64. Tested also on a fresh VMWare instance running Windows 7.

You can try running it with `dub --arch=x86_mscoff --verbose` in order to get more diagnostic messages for build errors.

Make sure you have "Visual C++ Redistributable for Visual Studio 2015" installed, it is required to be able to run the produced executable, if you don't build it using the Visual Studio command line. The reason is that both DMD and LDC will use the MinGW `.lib` files, which require a dynamic linked C runtime (static linking is permitted only with Visual Studio)

Thank you Radu!

Your answer helped and hello word is now running :)

After using --verbose I found that I do not have libcmt.lib on my computer at all. Though I have Visual Studio 2019 installed, it is for C#. Looks like when you have VS 2019, then classical redistributable packages are not supported any more. After a bit of experimenting I found adding "MSVC v142 - VS2019 C== x86/x85 build tools (v13.20" from VS installer installed the libcmt.lib. After running dub with --arch=x86_mscoff from VS command line it worked.

Reply via email to