cmake 报错: could not open ‘kernel32.lib‘: no such file or directory

首次用hello world想配置cmake。powershell下执行cmake .. -G "MinGW Makefiles"报的这个错。

因为查到这个库是windows下的,于是想着换成Unix试下。

执行:cmake .. -G "Unix Makefiles" 成功

cmake 版本:

cmake version 3.29.0-rc2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

gcc 版本:

clang version 18.1.1 (https://github.com/llvm/llvm-project.git dba2a75e9c7ef81fe84774ba5eee5e67e01d801a)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: D:/llvm-mingw/llvm-mingw-20240308-ucrt-x86_64/bin

你可能感兴趣的:(环境配置,c++)