Hello, I'm a novice.
I could compile and run with Clion until yesterday. But after I started a new project yesterday, Clion had a problem, and it was strange that the old project could compile and run. I found a lot of ways from the network, and also didn't solve it. It was so annoying, and then I unloaded and reloaded Clion and MinGW, and Clion went on strike. I hope to be able to get professional advice on how to solve this problem. The specific errors are as follows:
"D:\Program Files\JetBrains\CLion 2019.2.5\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=D:/Program Files/mingw64/bin/mingw32-make.exe" "-DCMAKE_C_COMPILER=D:/Program Files/mingw64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER=D:/Program Files/mingw64/bin/g++.exe" -G "CodeBlocks - MinGW Makefiles" "E:\C_C++ code\Clion_C_1\test1"
-- The C compiler identification is GNU 8.1.0
-- Check for working C compiler: D:/Program Files/mingw64/bin/gcc.exe
-- Check for working C compiler: D:/Program Files/mingw64/bin/gcc.exe -- broken
CMake Error at D:/Program Files/JetBrains/CLion 2019.2.5/bin/cmake/win/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
is not able to compile a simple test program.
It fails with the following output:
Change Dir: E:/C_C++ code/Clion_C_1/test1/cmake-build-debug-mingw/CMakeFiles/CMakeTmp
Run Build Command(s):D:/Program Files/mingw64/bin/mingw32-make.exe cmTC_38bf2/fast && D:/Program Files/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_38bf2.dir\build.make CMakeFiles/cmTC_38bf2.dir/build
mingw32-make.exe: Entering directory 'E:/C_C++ code/Clion_C_1/test1/cmake-build-debug-mingw/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_38bf2.dir/testCCompiler.c.obj
"D:\Program Files\mingw64\bin\gcc.exe" -o CMakeFiles\cmTC_38bf2.dir\testCCompiler.c.obj -c "E:\C_C++ code\Clion_C_1\test1\cmake-build-debug-mingw\CMakeFiles\CMakeTmp\testCCompiler.c"
Linking C executable cmTC_38bf2.exe
"D:\Program Files\JetBrains\CLion 2019.2.5\bin\cmake\win\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_38bf2.dir\link.txt --verbose=1
"D:\Program Files\JetBrains\CLion 2019.2.5\bin\cmake\win\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_38bf2.dir/objects.a
"D:\Program Files\mingw64\bin\ar.exe" cr CMakeFiles\cmTC_38bf2.dir/objects.a @CMakeFiles\cmTC_38bf2.dir\objects1.rsp
"D:\Program Files\mingw64\bin\gcc.exe" -Wl,--whole-archive CMakeFiles\cmTC_38bf2.dir/objects.a -Wl,--no-whole-archive -o cmTC_38bf2.exe -Wl,--out-implib,libcmTC_38bf2.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\cmTC_38bf2.dir\linklibs.rsp
D:/Program Files/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find @C:\WINDOWS\TEMP\cc2REQgK: Invalid argument
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [CMakeFiles\cmTC_38bf2.dir\build.make:88: cmTC_38bf2.exe] Error 1
mingw32-make.exe: Leaving directory 'E:/C_C++ code/Clion_C_1/test1/cmake-build-debug-mingw/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:120: cmTC_38bf2/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):