CMake Error: CMake was unable to find a build program corresponding to quot;MinGW Makefilesquot;(CMake错误:CMake找不到与Quot;MinGW MakefilesQuot;对应的生成程序)
问题描述
我正在尝试使用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生成器。您还需要在路径中同时放入mingwin和msys1.0in。
这篇关于CMake错误:CMake找不到与&Quot;MinGW Makefiles&Quot;对应的生成程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:CMake错误:CMake找不到与&Quot;MinGW Makefiles&Quot;对应的生成程序
基础教程推荐
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- CString 到 char* 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
