CLion compile error

已回答

Hello,

It's the second day that im trying to solve this issue, searched a lot, found nothing and I've lost all my hope. Please help me about this error, thanks in advance for your help.

-- 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 2018.1.6/bin/cmake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (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/�enbak/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_bccab/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_bccab.dir\build.make CMakeFiles/cmTC_bccab.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/ÃŒenbak/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bccab.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_bccab.dir\testCCompiler.c.obj -c C:\Users\┼�enbak\AppData\Local\Temp\cmake_check_environment\_build\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\┼�enbak\AppData\Local\Temp\cmake_check_environment\_build\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_bccab.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_bccab.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_bccab.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/ÃŒenbak/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_bccab/fast' failed
mingw32-make.exe: *** [cmTC_bccab/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/�enbak/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/�enbak/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeError.log".

Error code: 1

 

0

Hello!

The error happens because there are Unicode characters in the path (C:/Users/Å�enbak).

Please do the following:

  1. Create tmp folder in some location which doesn't have Unicode characters in the path.
  2. In CLion menu do Help | Edit Custom VM options....
  3. In the opened file add this line: -Djava.io.tmpdir=_path_from_1_.
  4. In the menu do File | Save All.
  5. Restart CLion.
1
Avatar
Permanently deleted user

This solution fixed my problem, Thanks!

0
Avatar
Permanently deleted user

Whether to support path with Unicode characters in the future?

1

It's not a CLion-related problem. It's a problem with using CMake + MinGW, because they don't support non-latin symbols. So we can't address it.

0

请先登录再写评论。