简体   繁体   English

“当Windows SDK版本设置为15063.13时,LNK1104无法打开文件'kernel32.lib'”

[英]“LNK1104 Cannot open file 'kernel32.lib' ” when Windows SDK version is set to 15063.13

I'm doing C++ in Visual Studio 2017, and just recently updated Windows 10 from Anniversary Update to Creator's Update. 我正在Visual Studio 2017中进行C ++,最近刚刚将更新的Windows 10从Anniversary Update更新为Creator的更新。

I found out by accident that when I'm compiling a DLL project, I would get the error message: 我偶然发现,当我编译DLL项目时,我会收到错误消息:

LNK1104 - cannot open file 'kernel32.lib'

After twiddling a bit in the Project Properties, I noticed if the Windows SDK version is set from 10.0.14393.0 to 10.0.15063.0 , the error message appears. 在Project Properties中稍微调整一下后,我注意到如果Windows SDK版本从10.0.14393.0设置为10.0.15063.0 ,则会显示错误消息。 If I set it back to 10.0.14393.0 , I can compile just fine. 如果我把它设置回10.0.14393.0 ,我可以编译得很好。

I would like to know why when the Windows SDK version is set to the Creator's Update build version, it's throwing this error message, yet it doesn't if set back to the Anniversary Update's build version? 我想知道为什么当Windows SDK版本设置为Creator的Update版本时,它会抛出此错误消息,但如果设置回Anniversary Update的构建版本则不会?

Thanks. 谢谢。

https://developercommunity.visualstudio.com/content/problem/41913/link-fatal-error-lnk1104-in-empty-c-project.html https://developercommunity.visualstudio.com/content/problem/41913/link-fatal-error-lnk1104-in-empty-c-project.html

The Windows 10 Creators Update SDK made some significant changes to what is installed as part of the installation to minimize on-disk footprint. Windows 10 Creators Update SDK对作为安装的一部分安装的内容进行了一些重大更改,以最大限度地减少磁盘占用空间。 This is a Known Issue that results from that refactoring work where the "desktop" components of the Creators Update SDK do not get installed by default. 这是一个已知问题,由于重构工作,默认情况下不会安装Creators Update SDK的“桌面”组件。 The previous new project logic always selected the latest Windows 10 SDK, assuming the desktop portions were installed as part of that installation scenario. 以前的新项目逻辑总是选择最新的Windows 10 SDK,假设桌面部分是作为安装方案的一部分安装的。 We are working on a fix for a future update. 我们正在努力修复未来的更新。

The workarounds available are as follows: 可用的解决方法如下:

  1. Select a version of the Windows 10 SDK that's fully installed on the system (ie 10.0.14393.0 or earlier) in the Project Properties 选择项目属性中完全安装在系统上的Windows 10 SDK版本(即10.0.14393.0或更早版本)

  2. Install the 'Windows 10 SDK (10.0.15063.0) for Desktop' component via the Visual Studio Installer. 通过Visual Studio安装程序安装'Windows 10 SDK(10.0.15063.0)for Desktop'组件。 win10sdk-15063desktop.png win10sdk-15063desktop.png

Daniel Griffing, 丹尼尔格里芬,

Visual C++ Libraries Visual C ++库

我有同样的问题,老实说,看起来像VS 2017中的一个错误。只需切换到10.0.10586.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C ++ | LNK1104 - 无法打开文件kernel32.lib - C++ | LNK1104 - cannot open file kernel32.lib LNK1104:链接openCV时无法打开文件'kernel32.lib' - LNK1104: cannot open file 'kernel32.lib' while linking openCV 致命错误 LNK1104:无法在 Visual Studio 2019 中打开文件“kernel32.lib” - fatal error LNK1104: cannot open file 'kernel32.lib' in Visual Studio 2019 Visual Studio错误:LNK1104:无法打开文件'kernel32.lib' - 仅在WP8项目/ Win32版本中 - Visual Studio error: LNK1104: cannot open file 'kernel32.lib' - only in WP8 projects / Win32 builds 为什么我收到错误LNK1104:无法打开文件'glew32.lib' - Why am I getting error LNK1104: cannot open file 'glew32.lib' Boost : 致命错误 LNK1104: 无法打开文件 (lib) - Boost : fatal error LNK1104: cannot open file (lib) Qt Creator LNK1104:无法打开文件'glu32.lib' - Qt Creator LNK1104: cannot open file 'glu32.lib' Visual Studio 2012 - 错误LNK1104:无法打开文件'glew32.lib' - Visual Studio 2012 - error LNK1104: cannot open file 'glew32.lib' 致命错误LNK1104:无法打开文件'gdi32.lib' - Fatal error LNK1104: cannot open file 'gdi32.lib' 链接:致命错误 LNK1104:无法打开文件“glut32.lib”。 如何解决此错误? - LINK : fatal error LNK1104: cannot open file "glut32.lib". how to fix this error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM