【问题标题】:Why is VSCodium failing to locate kernel32.lib?为什么 VSCodium 无法找到 kernel32.lib?
【发布时间】:2021-11-15 17:35:02
【问题描述】:

我正在尝试在 VSCodium 中构建一个基于 CMake 的 C 项目。

当我打开文件夹时,CMake 配置失败,错误显然是:

-- snip --
  LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\cygwin64\home\eyal\src\mine\printf\build\CMakeFiles\3.20.21032501-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
-- snip --

为什么 VSCode / CMake 没有正确设置路径来查找该文件?我的意思是,它是一些内部 MSVC 文件,对吧?

【问题讨论】:

    标签: windows visual-studio-code cmake kernel32


    【解决方案1】:

    虽然您似乎拥有 MSVC 编译器及其相关的标准库 - 您实际上可能缺少该文件 kernel32.lib。它是“Windows SDK”的一部分,您可以通过 MS Build Tools 安装程序(例如从 here)或 MS Visual Studio 安装程序下载。只是一些 MS 混乱(以及巨大的磁盘空间浪费)来习惯。

    【讨论】:

      猜你喜欢
      • 2012-10-19
      • 1970-01-01
      • 2017-01-23
      • 2015-03-02
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多