【发布时间】:2016-10-09 01:18:02
【问题描述】:
在 CLion 上加载 CMake 时遇到问题。我正在尝试为 Arduino 编程设置合适的环境。
我可能遗漏了一些明显的东西,但我无法找到解决此问题的实用解决方案。谁能给我提示一下导致以下错误的原因?
Error:The CMAKE_C_COMPILER:
avr-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
Error:The CMAKE_CXX_COMPILER:
avr-g++
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
【问题讨论】:
-
您的路径中没有合适的 C 和 C++ 编译器,至少没有名为 avr-gcc 和 avr-g++ 的编译器。要么安装它们,要么在给定的变量 CMAKE_C_COMPILER 和 CMAKE_CXX_COMPILER 中添加完整路径。
-
嗯,我在 MinGW 中找不到任何名为“avr-gcc”或“avr-g++”的东西,只有普通的“gcc”和“g++”。
-
然后相应地设置变量。检查相关问题和 CMake 文档。
-
这个问题太复杂,无法用几个词来回答。 CLion 跟踪器中存在问题,problem solution 有几种方法。