CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
1. Error report Description:
Error reporting when building C + + program with cmake:
$ cmake .
-- Building for: NMake Makefiles
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at CMakeLists.txt:2 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the specified file.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/eren.luo/Desktop/test/CMakeFiles/CMakeOutput.log".
2. Solution:
P. S. mingw64/bin and cmake have been added to the environment variable.
Modify
cmake .
to:
cmake -G "MinGW Makefiles" .
Use the following commands to run:
mingw32-make.exe all
3. the version of C++ and cmake:
- cmake-3.23.1-windows-x86_64.msi
- mingw-w64-install.exe
System: Windows 10
Read More:
- Cmake Error The C compiler identification is GNU 7.5.0 — The CXX compiler identification is unknown
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- [Solved] cmake: symbol lookup error: cmake: undefined symbol: _ZN4Json5ValueC1ERKSs
- Cmake compile cocos2d-x error [How to Solve]
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- How to Solve Msys2/mingw64 Run cmake GUI Error
- CMake Error: The source directory “opencv Install Catalog“ does not appear to contain CMakeLists.txt.
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019 -A Win64
- [Solved] Mac Cmake Complie openmp Error: fatal error: ‘omp.h‘ file not found
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused
- [Solved] CMake Error: Error: generator : Unix Makefiles
- [Solved] error MSB3073: CMake that the project does not need compatibility with older versions.
- [Solved] CMake Error Cannot specify link libraries for target “variational“ which is not built by this projec
- [Solved] CMake Error at CMakeLists.txt:92 (add_subdirectory)
- [Solved] CMake Error: The current CMakeCache.txt directory is different than xxx
- [PX4 Bug] make px4_sitl gazebo Error: CMake Error: The following variables are used in this project
- Cmake Compile opencv error: The system is: Windows – 10.0.19042 – AMD64 (Log File)
- [Solved] fatal error C1189: #error: STL1003: Unexpected compiler, expected C++ compiler