The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.

Completed

MinGW fails compiler tests with this error:

"C:\Program Files\JetBrains\CLion 2019.3.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:/MinGW/msys/1.0/bin/make.exe -G "CodeBlocks - MinGW Makefiles" Y:\Documents\Repos\testrepo
-- 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 2019.3.2/bin/cmake/win/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (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: Y:/Documents/Repos/testrepo/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/MinGW/msys/1.0/bin/make.exe cmTC_a1261/fast && /usr/bin/make -f CMakeFiles\cmTC_a1261.dir\build.make CMakeFiles/cmTC_a1261.dir/build
'mTC_a1261.dir' is not recognized as an internal or external command,
operable program or batch file.
make: *** [cmTC_a1261/fast] Error 1

 

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:40 (project)


-- Configuring incomplete, errors occurred!
See also "Y:/Documents/Repos/testrepo/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "Y:/Documents/Repos/testrepo/cmake-build-debug/CMakeFiles/CMakeError.log".

[Finished]

 

It appears to fail because of the presence of `/c` in the path which is a command prompt switch, because it has stripped the 'c' in the error: 'mTC_a1261.dir' is not recognized as an internal or external command,

3 comments
Comment actions Permalink

I had set the toolchain make path to msys make.

0
Comment actions Permalink

>I had set the toolchain make path to msys make.

For what purpose have you done that?

Please attach a screenshot of `File | Settings | Build, Execution, Deployment | Toolchains` (please capture the screenshot after the compiler detection is completed).

0
Comment actions Permalink

I set it while trying to fix another issue. Clearning the make path fixed it.

0

Please sign in to leave a comment.