这是 CMake 输出:
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/amd64/cl.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: E:/Code/Git/Brendan-C-SFML/build/CMakeFiles/CMakeTmp
Run Code Online (Sandbox Code Playgroud)
我已经检查了一些关于此的其他问题,他们说要降级到 .NET 4.0,但这对我不起作用。
在此答案中:Cmake 无法为 Visual Studios 10 amd64 配置项目
我找到了我的问题的解决方案。
对我来说是:
我发现我的 x64 编译器因安装 SP 1 而被破坏。尝试此更新来恢复它们:http ://www.microsoft.com/en-us/download/details.aspx?id=4422
我已经更新了编译器,现在它可以工作了。