VS 2010 and CMake: "rc" is not recognized as an internal or external command

I am trying to create a project on Windows 10 - Home using VS 2010 and CMake. I get the following errors:

zutil.c lib -nologo -out:zlib.lib adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj gzwrite.obj infback.obj inflate.obj inftrees.obj inffast.obj trees.obj uncompr.obj zutil.obj rc /dWIN32 /r /fozlib1.res ./win32/zlib1.rc 'rc' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'rc' : return code '0x1' Stop. *.dll The system cannot find the file specified. 0 file(s) copied. Setting environment for using Microsoft Visual Studio 2010 x86 tools. The system cannot find the file specified. -- The C compiler identification is MSVC 16.0.40219.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- broken CMake Error at C:/Program Files (x86)/CMake/share/cmake3.6/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Project/build/libpng-1.6.7-build/CMakeFiles/CMakeTmp 

Does anyone know what the reason is:

 'rc' is not recognized as an internal or external command, operable program or batch file." 

will be?

I assume the reason that cl.exe is a broken error?

0
visual-studio-2010 cmake
Feb 12 '17 at 17:05
source share
1 answer

The last time I encountered this problem, my standard installation of Visual Studio 2012 Professional did not install the Windows SDK (the missing SDK header was shown in the error log).

To verify the installation of the SDK, for example. make sure you have some kind of resource compiler. It should be on a path like:

 C:\Program Files (x86)\Microsoft SDKs\Windows\v[some version]\bin\RC.Exe 

Since I was missing this - or rather, any SDK - I installed the Windows 8.1 SDK (since Visual Studio 2012 targets Windows 8.x) and voila my CMake was able to compile (test) programs again. I think that for Visual Studio 2010 the default will be the Windows 7.0a SDK , and for Visual Studio 2015 it will be the Windows 10 SDK with Universal C Runtime .

Link

  • CXX compiler id unknown
  • Visual Studio 2010 Express, Windows SDK 7.1, CMake and 64 bit
+3
Feb 12 '17 at 20:30
source share



All Articles