CLion安装问题

我在安装Clion时候出现了下面的错误

– The C compiler identification is GNU 6.3.0
– The CXX compiler identification is GNU 6.3.0
– Check for working C compiler: C:/MinGW/bin/gcc.exe
– Check for working C compiler: C:/MinGW/bin/gcc.exe – broken
CMake Error at C:/Program Files/JetBrains/CLion 2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (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: C:/Users/noName/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp

Run Build Command:“C:/MinGW/bin/mingw32-make.exe” “cmTC_2e43b/fast”

C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_2e43b.dir\build.make CMakeFiles/cmTC_2e43b.dir/build

mingw32-make.exe1: Entering directory
‘C:/Users/noName/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp’

CMakeFiles\cmTC_2e43b.dir\build.make:64: recipe for target
‘CMakeFiles/cmTC_2e43b.dir/testCCompiler.c.obj’ failed

process_begin:
CreateProcess(C:\Users\noName\AppData\Local\Temp\make2428-1.bat, C:\Users\noName\AppData\Local\Temp\make2428-1.bat, …) failed.

make (e=2): El sistema no puede encontrar el archivo especificado.

mingw32-make.exe1: *** [CMakeFiles/cmTC_2e43b.dir/testCCompiler.c.obj] Error 2

mingw32-make.exe1: Leaving directory
‘C:/Users/noName/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp’

Makefile:125: recipe for target ‘cmTC_2e43b/fast’ failed

mingw32-make.exe: *** [cmTC_2e43b/fast] Error 2

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

– Configuring incomplete, errors occurred!
See also “C:/Users/noName/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/noName/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeError.log”.

Error code: 1

怎么解决呢

  1. 修改安装目录下/bin/idea.properties文件,将出现的四个路径都修改为不含中文的路径在这里插入图片描述
  2. 打开CLion,新建工程,点击 help – edit custom vm options
    在后面加上一行 -Djava.io.tmpdir=d:/CLion/Temp
    后面的路径名可以自己设置
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CLion是一款由JetBrains开发的跨平台集成开发环境(IDE),主要用于C和C++语言的开发。而EasyX是一个基于Windows API的简单易用的图形库,可以方便地进行图形界面的开发。 要在CLion安装EasyX,可以按照以下步骤进行操作: 1. 首先,确保你已经安装CLion和EasyX所需的编译器。推荐使用MinGW作为编译器,你可以在MinGW官网下载并安装最新版本的MinGW。 2. 下载EasyX库文件。你可以在EasyX官网(https://easyx.cn/)上下载最新版本的EasyX库文件。 3. 解压下载的EasyX库文件。将解压后的文件夹复制到一个你喜欢的位置,比如`C:\EasyX`。 4. 打开CLion,创建一个新的C或C++项目。 5. 在项目中创建一个源文件,比如`main.cpp`。 6. 在`main.cpp`中引入EasyX库。可以使用以下代码: ```cpp #include <graphics.h> ``` 7. 配置CLion项目以使用EasyX库。在CLion的菜单栏中选择`File -> Settings`(或者`Preferences`),然后选择`Build, Execution, Deployment -> CMake`。 8. 在右侧的"CMake options"中添加以下代码: ```cmake -DGRAPHICSLIB="C:/EasyX/lib" ``` 其中,`C:/EasyX/lib`是你之前解压EasyX库文件的路径。 9. 点击"Apply"(或者"OK")保存配置。 10. 现在你可以在CLion中编写使用EasyX库的代码了。记得在使用EasyX函数之前,需要调用`initgraph`函数进行图形环境的初始化。 这样,你就可以在CLion安装和使用EasyX库进行图形界面的开发了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值