Rust issues on Windows Server 2016 TP5

Hi:

On Windows 2016 TP5, attempting to run the rust compiler (rustc) as

C:> rustc --version

leads to the following error

The program can't start because MSVCR120.DLL is missing from your computer.

Please see screenshot at
Imgur

A quick search showed that MSVCR120.DLL is indeed present in the directory

C:\Windows/SysWOW64

As a result, i added the above directory to the PATH environment variable.

Attempting to execute the same command (from a newly started cmd.exe) shows this error

The application was unable to start correctly (0xc000007b). Click OK to close the application.

Please see screenshot at
Imgur

Operating Environment is as follows

Rust
Rust nightly 1.13 MSVC 64-bit
1.13.0.6097

Edition
Windows Server 2016 DataCenter Technical Preview 5 TP5

Version
1511

OS Build
14300.1054

System type
64-bit operating system
x64 processor

Visual C++ 2008 Redistributable
x64 9.0.30729.6161

Windows SDK
10.0.14393.33

My intent to first work with Rust binary on Windows 2016 TP5 with MSVC ABI and write Rust programs.
Subsequently, i'd like to daily builds on the machine.

Any pointers as to how this issue can be addressed ?

warm regards
Saifi.

Do you have a visual studio installed? It is required for msvc toolchain:

MSVC builds of Rust additionally require the Microsoft Visual C++ build tools for Visual Studio 2013 or later. The easiest way to acquire the build tools is by installing Microsoft Visual C++ Build Tools 2015 which provides just the Visual C++ build tools. Alternately, you can install Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools". No additional software installation is necessary for basic use of the GNU build.

@matklad thanks for your reply.

VC++ 2015 build tools are installed.
http://landinghub.visualstudio.com/visual-cpp-build-tools

This is a 64-bit version of Rust. As such it depends on 64-bit DLLs.

SysWOW64 is DLLs for 32-bit processes. Adding this to your PATH is a really bad idea due to the way Windows on Windows works, and also doesn't help because 64-bit Rust needs 64-bit DLLs.

The correct solution in this case is to note two things, the architecture of the failing program which is 64-bit, and the version number in the DLL which is 120 which means VS 2013. Therefore you need to download and install the VC++ 2013 64-bit redistributable available from https://www.microsoft.com/en-us/download/details.aspx?id=40784

1 Like

@retep998 Thanks so much for the link. It really helped.

i was under the impression that since i have installed VC++ 2015 64-bit redistributable, MSVCR120.DLL should be there as well.

Will it be correct to infer that a higher version redistributable will not be accumulative of the libraries from an earlier version redistributable ?

A given version of the VC++ redistributable is only for that version, not newer nor older versions. This is why your computer will usually end up with a massive pile of redistributables installed.

1 Like