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
    后面的路径名可以自己设置
发布了1 篇原创文章 · 获赞 1 · 访问量 3

猜你喜欢

转载自blog.csdn.net/qq_32292327/article/details/104495951
今日推荐