CMake错误:CMake找不到与&Quot;MinGW Makefiles&Quot;对应的生成程序

2022-04-27 00:00:00 box2d cmake c++

我正在尝试使用cmake为C++构建Box2D库。当我运行cmake gui时,我收到错误:

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

像这些人这样的大多数问题的答案都是"将MinGw/bin添加到路径中",但我已经在路径上找到了。导致此错误的其他原因可能是什么?


解决方案

mingw32-make.exe可以通过相应的复选框使用标准MinGW32安装程序进行安装:

正如Rubenvb指出的那样,你仍然需要确保它进入你的道路。如果通过系统属性编辑环境变量,请务必关闭并重新打开CMake图形用户界面。

如果您更习惯使用make.exe,请安装MSYS并使用MSYS Makefiles作为CMake生成器。您还需要在路径中同时放入mingwinmsys1.0in

相关文章