【问题标题】:CLion Compiler SetupCLion 编译器设置
【发布时间】:2020-08-17 17:36:20
【问题描述】:

我刚刚开始使用 C++ 和 CLion IDE。在观看了一段展示如何开始使用 CLion 的 YouTube 视频后,我收到了这个错误。我所做的只是尝试将 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]

Cmake List

【问题讨论】:

  • 很可能你没有安装g++ 包。
  • 你能展示你的 CMakelist 吗?
  • @FWeidinger 我添加了另一个截图

标签: c++ compiler-errors ide clion jetbrains-ide


【解决方案1】:

如果您只想使用gcc,请使用编译器的完整路径或将 gcc 路径添加到 PATH。

我猜如果你在 Preferences |构建、执行、部署 |工具链一切都应该工作。

请注意,Linux 是区分大小写的操作系统,而 GCC 可执行文件是 gcc

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多