【问题标题】:LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' in VS2017 RC链接:致命错误 LNK1104:无法在 VS2017 RC 中打开文件“ucrtd.lib”
【发布时间】:2016-11-23 06:49:49
【问题描述】:

我在 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()
{
}

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

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

更新: 来自@user1336087的评论后

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

[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 并重新安装。

【问题讨论】:

  • 也许这个link 会有所帮助!
  • 实际上,您收到的 Windows SDK 10 安装错误与您在链接中提到的错误不同。您的错误表明文件已损坏。请尝试重新下载 Windows SDK 10 并尝试重新安装。
  • 我安装的时候是从网上下载的..
  • 但下载后失败

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


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    这里的评论帮助我解决了同样的错误。似乎存在旧版本的 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

    【讨论】:

      猜你喜欢
      • 2011-09-07
      • 2011-06-23
      • 2017-11-29
      • 2014-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多