我刚刚开始使用C++和CLion IDE。我在看了一个YouTube的视频后,发现了这个错误,这个视频展示了如何开始使用CLion。我所做的就是尝试将GCC添加到CLion中作为C++的编译器。其他什么都没做。
我的GCC版本是7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)。
我只在HTML CSS & JS上编程了大约3个月,所以这个错误在我的头上。任何帮助将是非常感激的
以下是我的错误和一个截图的链接
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_CXX_COMPILER:
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 "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.
-- Configuring incomplete, errors occurred!
See also "/home/dominic/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/dominic/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeError.log".
[Failed to reload]
使用完整的编译器路径或添加gcc路径到PATH,如果你想只使用 gcc
.
我想,如果你指定C编译器为 /usr/bin/gcc
(或 /usr/local/bin/gcc
如果你在那里安装了它)和C++编译器,如 /usr/bin/g++
在首选项中