Unable to Compile Hello World in C

已回答

So I am unable to compile a basic Hellow World project in C. Here is the error I get:

 

C:\Users\Myname\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\173.4127.6\bin\cmake\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:/MinGW/msys/1.0/bin/make.exe -G "CodeBlocks - MinGW Makefiles" C:\Users\Myname\CLionProjects\HelloWorld
-- The C 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:/Users/Myname/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/173.4127.6/bin/cmake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (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/Myname/CLionProjects/HelloWorld/cmake-build-debug/CMakeFiles/CMakeTmp

 

Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe" "cmTC_a2628/fast"

0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487

AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x3B0000, State
0x10000

C:\MinGW\msys\1.0\bin\make.exe: *** Couldn't reserve space for cygwin's
heap, Win32 error 0

 

 

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


-- Configuring incomplete, errors occurred!
See also "C:/Users/Myname/CLionProjects/HelloWorld/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Myname/CLionProjects/HelloWorld/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]


0

Hi!

Please try using system reboot. Does that help? 

0
Avatar
Permanently deleted user

Solved it. Just if anyone needs a solution, needed to use: mingw32-make.exe, not the make.exe in msys folder.

https://stackoverflow.com/questions/42752721/mingw-64-ships-without-make-exe

0

请先登录再写评论。