-
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
LINK : fatal error LNK1181: cannot open input file 'legacy_stdio_definitions.lib' #110842
Comments
The fix would be to install a newer version of VS, but since the docs say that VS 2013 is supported, it may be a bug. |
This is a very weird coincidence but just four hours ago I posted a PR to libc to stop linking this in Rust's std rust-lang/libc#3226 |
Btw we do still say we support VS 2013 but it isn't tested so we have to rely on user reports for bugs. It's currently on the "extended" stage (security fixes only) of Microsoft's support cycle, which ends next year. |
@ChrisDenton I don't know this is necessarily a Visual Studio version issue, there's some other build problem you (we?) are missing. Trying to fix a completely unrelated build wixtoolset/issues#8173, am having to use explicit package directory includes for the microsoft vc libs everywhere. I am using VS 2022 for this build. I think it is a compiler bug, but I'm not sure, some other references e.g. ldc-developers/ldc#1085 (comment) mention that there is an issue with the std library being mismanaged. Possibly the CRT (C-runtime) used should be more explicitly mentioned by the tools, possibly there's some nonsense like the msvc compiler not talking to the linker correctly, however, just wanted to mention this as a possible cause of this build issue. |
Sorry, I'm unclear how that is related to Rust? |
LINK : fatal error LNK1181: cannot open input file 'legacy_stdio_definitions.lib' The bug is that your compiler can't find your legacy_stdio_definitions.lib, and that is caused by (what I presume must be) a visual studio compiler issue/invalid command line parameters flag.
Unless you were both committing two typos (possible but unlikely), this could be the source of this issue. Not sure how you would resolve, besides generating better include directories, or getting Microsoft to fix (or finding and fixing some issue in your buildchain). 😊 |
We don't use the MSVC compiler only the linker. This issue was that we were passing |
@ChrisDenton ah - mind linking the fix? I am quite curious what your fix was. |
The fix was simply not to link |
Closing as fixed. |
I want to compile the rust code with Pycharm, but it's failed. It prompts as follows:
LINK : warning LNK4044: unrecognized option '/NATVIS:C:\Users\lumi.lu.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\intrinsic.natvis'; ignored
LINK : warning LNK4044: unrecognized option '/NATVIS:C:\Users\lumi.lu.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis'; ignored
LINK : warning LNK4044: unrecognized option '/NATVIS:C:\Users\lumi.lu.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis'; ignored
LINK : warning LNK4044: unrecognized option '/NATVIS:C:\Users\lumi.lu.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libstd.natvis'; ignored
LINK : fatal error LNK1181: cannot open input file 'legacy_stdio_definitions.lib'
What's the legacy_stdio_definitions.lib? I already installed VS2013.
How to fix it?
The text was updated successfully, but these errors were encountered: