2016-10-09 102 views
0

我在CLion上加载CMake时遇到问题。我正在尝试为Arduino编程设置适当的环境。CLion CMake问题

我可能错过了一些明显的东西,但我无法找到这个功能的解决方案。任何人都可以给我一个关于什么导致下列错误的提示吗?

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. 
+0

您的路径中没有适当的C和C++编译器,至少没有一个名为avr-gcc和avr-g ++。请安装它们或在给定变量CMAKE_C_COMPILER和CMAKE_CXX_COMPILER中添加完整路径。 – usr1234567

+0

嗯,我在MinGW中找不到任何叫做“avr-gcc”或“avr-g ++”的东西,只有普通的“gcc”和“g ++”。 – Xorgon

+0

然后相应地设置变量。检查相关问题和CMake文档。 – usr1234567

回答

0

我按照arduino-cmake回购中给出的步骤工作。如果您正在使用Windows,请确保安装了arduino sdk。并将正确的路径设置为sdk。

如果您正在使用linux,请确保您已安装所有正确的依赖项,如在github repo中的readme.md中指定的。

最后但并非最不重要的一点,确保de cmake目录和工具链文件存在于项目文件夹中。

请参阅 https://github.com/arduino-cmake/arduino-cmake 有关正确的说明。