-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ucrt.lib linkage (again) #32159
Comments
Thanks for this information, in particular UPD2 was very useful. I will add a sanity check to #31158 to make sure the UCRT candidate is viable which should fix this problem for anyone else who runs into this. |
I ran into the same issue, I have installed:
The folder Not the best way of fixing it, I guess the proper way should be to rust to use a previous version of the windows SDK or just installing the latest version (Windows 10 SDK currently) |
Ran into a similar error:
|
Okay, this seems to have been caused by RLS? |
I'm confused with this actually - fresh installation of Rust on Windows (MSVC ABI) fails to link hello world. I found this ticket but it's pretty old and it's closed, so I assume it was fixed. Let's go to the explanation.
This is the simple hello world (
main.rs
):there is no any other files in project, no cargo setup or something.
Using
rustc main.rs
I'm getting this error:Based on the ticket above I provided compiler the path to
ucrt.lib
withrustc -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" main.rs
and it works just fine.Additional info:
rustc 1.8.0-beta.1 (facbfdd71 2016-03-02)
, MSVC ABI. (but error is the same with 1.7 stable. I didn't try nightly build).Windows 10 Pro, x64
/bin/
directory have added to thePATH
environment variable.So. Am I missed some installation steps or it's a problem with my environment?
UPD: Just tried to run compiler from VS developer command prompt and got the other error:
note: msvcrt.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
and I have no clue how I can to change the architecture. I don't see a separate x64 version of VS dev cmd.UPD2: I investigated further and found that linker message contains this command line option among the others:
"/LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.10586.0\\ucrt\\x64"
. The weird part here that while my system has10.0.10586.0
there is NOucrt
folder in it. But it has10.0.10150.0/ucrt/*
and10.0.10240.0/ucrt/*
folders.UPD3: Since this
ucrt
folder obviously is the part of the Windows 10 SDK, I installed it manually from official page with ALL available checkboxes checked. Now I have10.0.10586.0/ucrt/*
folders and compilation works without any additional steps. In the end I'm not sure should I close this ticket or such situation can be handled by installer orrustc
itself. Minor clarification: I DON'T installed Win 10 SDK manually before,10.0.10150.0
version was installed either as dependency for some packages I've used in development or with VS updates. Somehow this installation was not full and didn't include this ucrt libraries.The text was updated successfully, but these errors were encountered: