所以我尝试根据 youtube 上的本教程配置一个文件,这非常简单:
https://www.youtube.com/watch?v=gYmgbqGfv-8 https://www.youtube.com/watch?v=gYmgbqGfv-8
我在 Windows 10 中使用 CMake GUI,并且我有一个正在运行的 Visual Studio 2015,它已经能够构建 c++ 项目(我已经使用它有一段时间了)
我使用“Visual Studio 15 2017”
我为两个输入创建了一个名为 hellocmake 和 hellocmake/build 的文件夹:
我的输入 https://i.stack.imgur.com/UPdT7.png
但是当我尝试配置时,它说
CMakeLists.txt 处的 CMake 错误:1(项目):
找不到 CMAKE_C_COMPILER。
CMakeLists.txt 处的 CMake 错误:1(项目):
找不到 CMAKE_CXX_COMPILER。
错误日志指定它找不到两个编译器文件:
编译 C 编译器识别源文件“CMakeCCompilerId.c”失败。
编译器:
构建标志:
标识标志:
The output was:
The system cannot find the file specified
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
The system cannot find the file specified
我尝试下载“CMakeCXXCompilerId.cpp”和“CMakeCXXCompilerId.c”文件并尝试将它们手动添加到同一文件夹中,但没有解决问题
我试图查找其他几个有类似案例的来源,但我似乎无法理解它们。
我的旧计算机不存在这个问题,所以我认为它与 Visual Studio 有关?
谢谢你们,任何帮助将不胜感激