Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while configuring CMake project: Running 'nmake' '-?' failed

Tags:

c

cmake

nmake

I'm following this tutorial for building GLFW on Windows, and I'm getting the error when running cmake -S . -B Build:

PS ~\glfw-3.3.2\GLFW> cmake -S . -B Build
CMake Error at CMakeLists.txt:3 (project):
  Running

   'nmake' '-?'

  failed with:

   The system cannot find the file specified


-- Configuring incomplete, errors occurred!
See also "~/glfw-3.3.2/GLFW/Build/CMakeFiles/CMakeOutput.log".

Output log is almost completely empty containing only one line with my windows version. I haven't found any discussions or problems matching mine. And I don't even know does nmake have -? flag since it's not listed on microsoft docs site.

I've tried positioning in other folder because maybe that's the case. But with no luck.

I tried solving it with other error solution's but to no avail.

like image 329
luka_bur3k Avatar asked Sep 12 '25 17:09

luka_bur3k


1 Answers

The solution was to append -G "MinGW Makefiles" to cmake -S . -B Build command. As Tsyvarev suggested I looked more into generators and found out that setting the flags doesn't imply which generator will be used. So manually setting the flags solved the problem for me.

like image 82
luka_bur3k Avatar answered Sep 15 '25 07:09

luka_bur3k