You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When cargo build is used outside of an VS2015 {x86,x64} Native Tools Command Prompt, I receive this error during linking:
rustc: LINK : fatal error LNK1104: cannot open file 'ucrt.lib'
in librustc_trans/back/msvc/mod.rs:
// The MSVC linker uses the LIB environment variable as the default lookup// path for libraries. This environment variable is normally set up by the// VS shells, so we only want to start adding our own pieces if it's not// set.//// If we're adding our own pieces, then we need to add two primary// directories to the default search path for the linker. The first is in// the VS install direcotry and the next is the Windows SDK directory.
When building using the VS2015 toolkit, there is a third path needed: The path to ucrt.lib. On my system, it is C:\Program Files (x86)\Windows Kits\10\lib\10.0.10150.0\ucrt\x64. Here is the full value of the LIB environment variable that vcvarsall.bat sets:
LIB=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\ProgramFiles (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10150.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
Here's the build output, reformatted so every parameter is on its own line:
When
cargo build
is used outside of an VS2015 {x86,x64} Native Tools Command Prompt, I receive this error during linking:rustc: LINK : fatal error LNK1104: cannot open file 'ucrt.lib'
in librustc_trans/back/msvc/mod.rs:
When building using the VS2015 toolkit, there is a third path needed: The path to ucrt.lib. On my system, it is
C:\Program Files (x86)\Windows Kits\10\lib\10.0.10150.0\ucrt\x64
. Here is the full value of theLIB
environment variable thatvcvarsall.bat
sets:Here's the build output, reformatted so every parameter is on its own line:
The text was updated successfully, but these errors were encountered: