www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Installing D on Fresh Windows 10 machine is a pain

reply Jesse Phillips <Jesse.K.Phillips+D gmail.com> writes:
Installing D isn't new to me but I haven't really had to do a 
fresh install for awhile and come from a time when I was 
installing VS from 2010 and up.

VS 2019 Professional is installed on the system.

I have installed the C++ desktop development for VS.

DMD installer still is unable to find "VS installed"

I've also installed the C++ 2010 redistributables to try and use 
the MinGW install path.

I've also utilized the developer command prompt
---

Upon compiling a 64bit hello world I get

     helloworld> dmd -m64 .\hello.d
     LINK : fatal error LNK1104: cannot open file 'libucrt.lib'
     Error: linker exited with status 1104

This appears to have been a library moved around VS 2015 release, 
and I don't want to do the copying around solution the internet 
suggests.

I understand that as a compiler it is important to support 
systems of an older nature and so updating to the latest C++ 
runtimes might hinder usage of D.

It is just sad that at one point the install really did just take 
care of things and now it can't find things.
Aug 27 2020
next sibling parent Jesse Phillips <Jesse.K.Phillips+D gmail.com> writes:
On Thursday, 27 August 2020 at 15:59:51 UTC, Jesse Phillips wrote:

 Upon compiling a 64bit hello world I get

     helloworld> dmd -m64 .\hello.d
     LINK : fatal error LNK1104: cannot open file 'libucrt.lib'
     Error: linker exited with status 1104
I solved this by either installing c++ development tools from Community or by switching my path to the 64bit DMD.
Aug 27 2020
prev sibling next sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 27 August 2020 at 15:59:51 UTC, Jesse Phillips wrote:
 Installing D isn't new to me but I haven't really had to do a 
 fresh install for awhile and come from a time when I was 
 installing VS from 2010 and up.

 VS 2019 Professional is installed on the system.

 I have installed the C++ desktop development for VS.

 DMD installer still is unable to find "VS installed"

 I've also installed the C++ 2010 redistributables to try and 
 use the MinGW install path.

 I've also utilized the developer command prompt
 ---

 Upon compiling a 64bit hello world I get

     helloworld> dmd -m64 .\hello.d
     LINK : fatal error LNK1104: cannot open file 'libucrt.lib'
     Error: linker exited with status 1104

 This appears to have been a library moved around VS 2015 
 release, and I don't want to do the copying around solution the 
 internet suggests.

 I understand that as a compiler it is important to support 
 systems of an older nature and so updating to the latest C++ 
 runtimes might hinder usage of D.

 It is just sad that at one point the install really did just 
 take care of things and now it can't find things.
It has worked for me every time I've installed it since VS 2015. libucrt.lib should have been installed by the VS installer. Something to check: run the installer again, click the checkbox in corner of the 'Desktop development with C++' box, then look under the 'Installation details' list that comes up and make sure a version of the Windows 10 SDK is installed. If you don't see one with a check next to it, then check the latest one and modify the installation.
Aug 27 2020
parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 27 August 2020 at 16:35:07 UTC, Mike Parker wrote:

 It has worked for me every time I've installed it since VS 
 2015. libucrt.lib should have been installed by the VS 
 installer. Something to check: run the installer again, click 
 the checkbox in corner of the 'Desktop development with C++' 
 box, then look under the 'Installation details' list that comes 
 up and make sure a version of the Windows 10 SDK is installed. 
 If you don't see one with a check next to it, then check the 
 latest one and modify the installation.
Or maybe better, just go to the 'Individual components', select the latest Windows 10 SDK version, and install it.
Aug 27 2020
parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 27 August 2020 at 16:39:05 UTC, Mike Parker wrote:

 Or maybe better, just go to the 'Individual components', select 
 the latest Windows 10 SDK version, and install it.
Or just check the installation folder. For me, it's: C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64
Aug 27 2020
parent reply bachmeier <no spam.net> writes:
On Thursday, 27 August 2020 at 16:44:28 UTC, Mike Parker wrote:
 On Thursday, 27 August 2020 at 16:39:05 UTC, Mike Parker wrote:

 Or maybe better, just go to the 'Individual components', 
 select the latest Windows 10 SDK version, and install it.
Or just check the installation folder. For me, it's: C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64
It would be nice to have a screencast of this for someone that doesn't work often with Windows.
Aug 27 2020
parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 27 August 2020 at 17:34:03 UTC, bachmeier wrote:

 It would be nice to have a screencast of this for someone that 
 doesn't work often with Windows.
There are screenshots in the VS docs, e.g., https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2019 And videos on YouTube.
Aug 27 2020
parent reply novice3 <sorryno em.ail> writes:
DMD x86 on Windows have no dependencies, just unpack .zip and use.
It's a pitty, that DMD x64 depend on VS :(
Aug 27 2020
parent Jacob Carlborg <doob me.com> writes:
On Friday, 28 August 2020 at 05:38:59 UTC, novice3 wrote:
 DMD x86 on Windows have no dependencies, just unpack .zip and 
 use.
 It's a pitty, that DMD x64 depend on VS :(
It does not. If VS is not installed the MinGW provided libraries, which are bundled, will be used. -- /Jacob Carlborg
Aug 28 2020
prev sibling parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 28/08/2020 3:59 AM, Jesse Phillips wrote:
 
 DMD installer still is unable to find "VS installed"
One of the reasons for this is that the environment variables have not been updated. You need to restart to do this.
Aug 28 2020
parent Jesse Phillips <Jesse.K.Phillips+D gmail.com> writes:
On Friday, 28 August 2020 at 14:36:57 UTC, rikki cattermole wrote:
 On 28/08/2020 3:59 AM, Jesse Phillips wrote:
 
 DMD installer still is unable to find "VS installed"
One of the reasons for this is that the environment variables have not been updated. You need to restart to do this.
This might have been the issue, I don't recall it requesting a restart and I don't know if I restarted when I had gotten it fixed (I don't think I did). I unistalled everything (VS and C++ redistributables) then restarted. Installed the C++ development environment with VS and restarted. Seems that it builds now.
Aug 31 2020