链接:致命错误LNK1104:无法在VS2017 RC中打开文件'ucrtd.lib'

时间:2016-11-23 06:49:49

标签: c++ linker linker-errors visual-studio-2017

我在Visual Studio 2017 RC中构建C ++项目时遇到错误。

1>------ Build started: Project: test, Configuration: Debug x64 ------
1>Source.cpp
1>LINK : fatal error LNK1104: cannot open file 'ucrtd.lib'
1>Done building project "test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

操作系统:Windows 8.1,Visual Studio 2017候选发布版

这是我的计划:

int main()
{
}

我没有将语言设置为任何特殊的

enter image description here

我在整个机器上搜索了该文件。但是找不到它。 我已经安装了Windows SDK 8.1

更新: 来自@ user1336087的评论

我尝试安装Windows SDK 10I时收到错误:

[14f0:0009][2016-11-23T09:22:20] Package 'Win10SDK_10.0.14393.33,version=10.0.14393.3300' failed to install. Command executed: "C:\ProgramData\Microsoft\VisualStudio\Packages\Win10SDK_10.0.14393.33,version=10.0.14393.3300\packages\Win10SDK\10.0.14393.33\sdksetup.exe" /features OptionId.WindowsSoftwareDevelopmentKit OptionId.WindowsSoftwareLogoToolkit OptionId.NetFxSoftwareDevelopmentKit /quiet /norestart, Return code: -2146889721, Details: The hash value is not correct.

似乎已在此处描述了一种解决方法:link 但即使我卸载所有SDK并再次安装,解决方法仍然失败。

2 个答案:

答案 0 :(得分:1)

它适用于Visual Studio 2017的最终版本

答案 1 :(得分:0)

此评论在帮助我时遇到了同样的错误。似乎存在旧版本的Windows SDK可能会导致LINK混淆。删除旧版本后,我已经解决了问题。

https://community.intel.com/t5/Intel-Fortran-Compiler/LINK-fatal-error-LNK1104-cannot-open-file-ucrtd-lib-with-VS2015/td-p/1060422

相关问题