No CMAKE_C_COMPILER could be found.
时间: 2023-09-24 15:05:47 浏览: 154
CMake Practice不包含
This error message typically occurs when CMake cannot find a C compiler on your system. To resolve this issue, you can try one of the following solutions:
1. Install a C compiler on your system. For example, if you are using Ubuntu or Debian, you can install the GNU C compiler by running the following command in your terminal:
```
sudo apt-get install gcc
```
2. Set the C compiler path in your CMakeLists.txt file. You can do this by adding the following line to your CMakeLists.txt file:
```
set(CMAKE_C_COMPILER /path/to/your/c/compiler)
```
Replace "/path/to/your/c/compiler" with the path to your C compiler.
3. If you are using an IDE, make sure that it is configured to use the correct C compiler. Check the IDE's settings or preferences to ensure that the correct compiler is selected.
Once you have resolved the issue, try running CMake again.
阅读全文