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
    後面的路徑名可以自己設置
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章