Problem z dodaniem kompilatora do CLion

0

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.

0

Chyba nie chodzi o dodanie kompilatora, tylko:
testCCompiler.c: No such file or directory

0

Jakiś pomysł jak to obejść ? Bo z tego co rozumiem to wywala się na jakieś testowej kompilacji.

0

Dziwi mnie ta ścieżka: C:\Users\Ja\CLionProjects\untitled4\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
Skoro to jest projekt testowy to czemu źródło siedzi w untitled4?
Ja bym oczekiwał raczej, że ten plik będzie w
Sprawdź czy ten plik istnieje, albo poszukaj go w innej lokalizacji, bo to wygląda tak, jakby ktoś coś źle skonfigurował dla tego projektu testowego.

Nie mam CLion więc możesz też załączyć zawartość C:/Program Files/JetBrains/CLion 2018.3.4/bin/cmake/win/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake.

0

Dobra, już nieważne. Działa mi kompilowanie przez g++ w cmd Windowsowym i przy tym zostanę. Dzięki za pomoc.

1 użytkowników online, w tym zalogowanych: 0, gości: 1