这是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
我检查了有关此问题的其他一些问题,他们说降级到.NET 4.0,但这对我不起作用。
最佳答案
在这个答案中:Cmake is Unable to Configure Project for Visual Studios 10 amd64
我找到了解决问题的办法。
对我来说是:
我已经更新了编译器,现在可以正常工作了。
关于visual-c++ - CMake cl.exe无法编译简单的测试程序,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30553318/