Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get CMAKE to compile a project

Here's the error I'm getting:

-- Building for: NMake Makefiles
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_86068\fast"
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake:61 (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:/--REDACTED--/CMakeFiles/CMakeTmp



Run Build Command:"nmake" "/NOLOGO" "cmTC_86068\fast"

The system cannot find the file specified

Generator: execution of make failed.  Make command was: "nmake" "/NOLOGO" "cmTC_86068\fast"





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:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeOutput.log".
See also "C:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeError.log".

For the record I am using:

  • gcc and g++ from MinGW 4.8.1
  • CMake 3.4.1

I have no idea what the issue could be, I've looked extensively online and have not found anywhere where somebody has gotten a solution, except in cases where it had to do with path issues where the path included non-latin characters or no write access, which is not the case for any of the directories in question. I seriously am about to give up completely on ever being able to get this to work, but I don't know what to do because I absolutely NEED the socket.io client for C++ for this project.

like image 234
Clinton J Avatar asked Oct 19 '25 10:10

Clinton J


1 Answers

CMake is a utility which generates a "makefile" for different build systems. Here you generate a nmake makefile and it seems that you don't have nmake in your path.

You can launch CMake with option -G "MinGW Makefiles" in order to generate a makefile compatible with mingw make. Then issue the command:

mingw32-make
like image 179
fievel Avatar answered Oct 21 '25 01:10

fievel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!