CLion集成环境配置实用

来源:互联网 发布:nginx fastcgi temp 编辑:程序博客网 时间:2024/04/30 00:27
mac OS 下载安装后,新建工程报如下错:

Error:Could not find compiler set in environment variable CC:
arm-linux-androideabi-gcc.
Error:Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
Error:Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
Error:Could not find cmake module file: /Users/yuqianli/Library/Caches/clion11/cmake/generated/6dec7b0e/6dec7b0e/__default__/CMakeFiles/3.3.2/CMakeCCompiler.cmake
Error:Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
Error:Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
Error:Could not find cmake module file: /Users/yuqianli/Library/Caches/clion11/cmake/generated/6dec7b0e/6dec7b0e/__default__/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake
Error:No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting 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:No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting 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.
Error:CMAKE_C_COMPILER not set, after EnableLanguage
Error:CMAKE_CXX_COMPILER not set, after EnableLanguage

解决办法:
  1. 在设置里左边找到 Build
  2. 展开后找到CMake
  3. 在CMake具体配置页的CMake options框里填入如下配置项    -D CMAKE_C_COMPILER=gcc -D CMAKE_CXX_COMPILER=g++

0 0
原创粉丝点击