– Building for NMake Makefiles
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists. txt:5 (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++, c make 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:5 (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++, c make 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 c make 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 “E:/gc/c_test1/build/CMakeFiles/CMakeOutput.log”.
See also “E:/gc/c_test1/build/CMakeFiles/CMakeError.log”.
1.Don’t use make.. Use these commands:
cmake -G "MSYS Makefiles" ..
2. If the first one doesn’t work, set the path:
$ export CC=/c/MinGW/bin/gcc.exe
$ export CXX=/c/MinGW/bin/g++.exe
$ cmake -G "MinGW Makefiles" ..
-- The CXX compiler identification is GNU 4.8.1
...
$ mingw32-make
The second:
$ cmake -DCMAKE_C_COMPILER=/c/MinGW/bin/gcc.exe -DCMAKE_CXX_COMPILER=/c/MinGW/bin/g++.exe ..
If not, please refer to the following link:
https://www.e-learn.cn/content/wangluowenzhang/22835
https://stackoverflow.com/questions/29746950/cmake-cannot-find-compiler
Read More:
- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:11 (project):
- CMake Error: The source directory “opencv_install_catalog“ does not appear to contain CMakeLists.txt.
- CMake Error: The source directory “/home/Demo1“ does not appear to contain CMakeLists.txt.
- CMake Error: The source directory “*” does not appear to contain CMakeLists.txt.
- Visual slam Lesson 6: curve fitting with g2o, error: cmake error at CMakeList.txt (find_ package) By not providing“FindG2O.cmake“
- Solve the problem of the C compiler identification is unknown or the cxx compiler identification is unknown in the process of using cmake
- Clion appears cmake error: could not find cmake_ Root! What is the problem and how to solve it?
- JOM error 2 problem when qtcreator uses cmake to build a project
- CMake Error: Could not find CMAKE_ROOT !!!
- Project files may be invalid appears when cmake compiles opencv3.1, and the debug additional dependency of the compiled opencv3.1 is at the end
- Vs2019: solution nvcc total: cannot find compiler‘ cl.exe ‘ in PATH
- CMake Error:Could not find CMAKE_ROOT!!!
- Solution: when cmake is compiled, “error in configuration process project files may be invalid” appears
- ninja Compiling the C compiler identification source file CMakeCCompilerId.c failed
- Brief introduction of cmake generating all in vs Project_ BUILD、INSTALL、ZERO_ Check function!!
- Install Python C extension compiler environment under windows (solve “error: command” cl.exe ‘ failed: No such file or directory”)
- The C compiler identification is unknown
- Cmake[Warning]:Policy CMP0054 is not set
- When cmake is compiled, “error in configuration process project files may be invalid” appears
- In windows, “cmake” is not an internal or external command, nor a runnable program or batch file.