Failed to execute "cmake." command at the prompt

Asked

Viewed 700 times

1

I’m studying object detection with Python and Dlib and for that I need to compile the imglab folder inside the directory: "dlib-19.17 tools imglab" from the dlib-19.7 file I downloaded from the official website http://dlib.net. In this folder you have a txt README with installation instructions and when I arrive at the part I should execute the command cmake .. the following error appears in my prompt:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:11 (PROJECT):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:11 (PROJECT):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Users/marco/Desktop/PROGRAMA/dlib-19.17/tools/imglab/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/marco/Desktop/PROGRAMA/dlib-19.17/tools/imglab/build/CMakeFiles/CMakeError.log".

C:\Users\marco\Desktop\PROGRAMA\dlib-19.17\tools\imglab\build>cmake --build . --config Release
O sistema não pode encontrar o arquivo especificado
CMake Error: Generator: execution of make failed. Make command was: nmake /nologo

Cmakeoutput.log file

The system is: Windows - 10.0.17134 - AMD64

Cmakeerror.log file."

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -D__CLASSIC_C__ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:  

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --c++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: --ec++ 

The output was:
O sistema não pode encontrar o arquivo especificado


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":

I have Cmake version 3.14.3 installed

2 answers

2

Cmake did not find the compiler, in your case you are trying to compile in Visual C++, you need to install Visual C++

  • I have Visual C++ installed, versions: 2005, 2008, 2010, 2012, 2013 and 2017 all Redistributable

  • You need to install Build Tools a Redistributable and Visual C Website++

  • here link: https://www.microsoft.com/en-us/download/details.aspx?id=48159

  • Thank you very much, it worked!!

1


You need to have some Visual Studio installed, it can even be Express or Community. (Warning: Redistributable is not compiler).

Also you have to use the right "Enerator", each version of Visual C++ has a different Enerator. But what is "Enerator"? Generator is the value passed in the -G parameter on the cmake call line. To know the existing generators you use the "cmake --help" command. A partial example:

...
    The following generators are available on this platform:
  Visual Studio 15 [arch]      = Generates Visual Studio 15 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.