I am trying to compile a git project, and I ran into some problems with CMake. Initially, he did not find the C ++ compiler and caused an error:
cmake ..
No CMAKE_CXX_COMPILER.
Tell CMake where to find the compiler by setting either the "CXX" environment variable or writing the CMMA CMAKE_CXX_COMPILER CMake cache to the full path to the compiler or the name of the compiler if it is in PATH.
So I did:
CXX="gcc" cmake ..
Another error was caused:
- CXX compiler id unknown
- Check the operation of the CXX compiler: / usr / bin / gcc
- Check the operation of the CXX compiler: / usr / bin / gcc - broken
CMake error in / usr / share / cmake -3.0 / Modules / CMakeTestCXXCompiler.cmake: 54 (message):
The C ++ compiler "/ usr / bin / gcc" cannot compile a simple test program.
How can I solve this error and compile the project?
source share