Zainstalowałem MinGW 64 na Windows 8, w CLion podałem do niego ścieżkę, a ścieżki do C Compiler i C++ Compiler zostały wykryte automatycznie. Gdy próbuję uruchomić projekt dostaję error:
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe -- broken
CMake Error at C:/Program Files/JetBrains/CLion 2018.3.4/bin/cmake/win/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Ja/CLionProjects/untitled4/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe" "cmTC_add5f/fast"
C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_add5f.dir\build.make CMakeFiles/cmTC_add5f.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Ja/CLionProjects/untitled4/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_add5f.dir/testCCompiler.c.obj
C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\gcc.exe -o CMakeFiles\cmTC_add5f.dir\testCCompiler.c.obj -c C:\Users\Ja\CLionProjects\untitled4\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Ja\CLionProjects\untitled4\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
mingw32-make.exe[1]: *** [CMakeFiles\cmTC_add5f.dir\build.make:65: CMakeFiles/cmTC_add5f.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Ja/CLionProjects/untitled4/cmake-build-debug/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:120: cmTC_add5f/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ja/CLionProjects/untitled4/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ja/CLionProjects/untitled4/cmake-build-debug/CMakeFiles/CMakeError.log".
[Failed to reload]
Próbowałem dodać set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
aczkolwiek nie pomogło. Proszę o pomoc.