【CLion CMake错误】CMake Error: Generator: execution of make failed.

无意中发现了一个巨牛的人工智能教程,忍不住分享一下给大家。教程不仅是零基础,通俗易懂,而且非常风趣幽默,像看小说一样!觉得太牛了,所以分享给大家。点这里可以跳转到教程。人工智能教程

一、错误信息如下:

-- The C compiler identification is GNU 6.3.0
-- Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: C:/MinGW/bin/mingw32-make.exea -f Makefile cmTC_15406/fast && 
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: C:/MinGW/bin/mingw32-make.exea -f Makefile cmTC_608d9/fast && 
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - broken
CMake Error at D:/Program Files/JetBrains/CLion 2021.2.3/bin/cmake/win/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "C:/MinGW/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/CLionProjects/MyCproject/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/MinGW/bin/mingw32-make.exea -f Makefile cmTC_608d9/fast && 绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆�
    Generator: execution of make failed. Make command was: C:/MinGW/bin/mingw32-make.exea -f Makefile cmTC_608d9/fast && 
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "D:/CLionProjects/MyCproject/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "D:/CLionProjects/MyCproject/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]

初步原因分析:CMake 未安装,这里我们下载安装。

二、CMake 下载
官方下载地址如下:点击
电脑是64位的,我这里下载64位windows安装包 cmake-3.22.0-rc1-windows-x86_64.msi

在这里插入图片描述

或者 下载压缩包也可以。cmake-3.22.0-rc1-windows-i386.zip

在这里插入图片描述
下载解压好后,放在C盘,重命名文件名CMake ,然后配置环境变量。
将 C:\CMake\bin 目录加入path中去即可。cmd 验收 cmake 是否安装成功。

在这里插入图片描述

CMake 安装好后,再配置Clion 就不会报错了。

在这里插入图片描述
在这里插入图片描述

配置好后,点击run ,成功运行hello wolld 。到此环境配置完成。
在这里插入图片描述

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东华果汁哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值