C++ CMake 无法找到对应于“Unix Makefiles”的构建程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48160125/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 15:43:19  来源:igfitidea点击:

CMake was unable to find a build program corresponding to "Unix Makefiles"

c++cmakeclion

提问by AcousticScarf

brand new to coding. I've installed CLion and I plan to start coding on C++. I've also installed Cygwin. I've researched for the last hour or so on how a compiler works and how to use it, but when I selected the compiler on Clion I get the errors

全新的编码。我已经安装了 CLion,我计划开始在 C++ 上编码。我还安装了 Cygwin。我已经研究了最后一个小时左右的编译器如何工作以及如何使用它,但是当我在 Clion 上选择编译器时,我得到了错误

"CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."

“CMake 错误:CMake 无法找到与“Unix Makefiles”相对应的构建程序。未设置 CMAKE_MAKE_PROGRAM。您可能需要选择其他构建工具。”

"CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage"

“CMake 错误:在 EnableLanguage 之后未设置 CMAKE_C_COMPILER”

and

"CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage"

“CMake 错误:在 EnableLanguage 之后未设置 CMAKE_CXX_COMPILER”

I've looked for some answers, but they all seem very vague or not quite the answers I'm looking for. I would really appreciate it if somebody could help me as I'm eager to start coding but this is setting me back. Thank you.

我已经寻找了一些答案,但它们似乎都非常模糊或不完全是我正在寻找的答案。如果有人能帮助我,我真的很感激,因为我渴望开始编码,但这让我退缩了。谢谢你。

采纳答案by jstuartmilne

At first glance it seems to me you are missing a compiler. Do you have a compiler installed g++ or windows equivelent. You mentioned you are using cygwin if you are planning to use gcc/g++ etc take a look at this tutorial

乍一看,在我看来,您缺少编译器。你有没有安装 g++ 或 windows 等效的编译器。如果您打算使用 gcc/g++ 等,您提到您正在使用 cygwin,请查看本教程

https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html

https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html

You can install them via Cygwin

您可以通过 Cygwin 安装它们