CMake cl.exe无法编译简单的测试程序 [英] CMake cl.exe is not able to compile a simple test program

查看:315
本文介绍了CMake cl.exe无法编译简单的测试程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是CMake的输出:

This is the CMake output:

-- 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,但这对我没有用。

I've checked some other questions about this and they say to downgrade to .NET 4.0 but that didn't work for me.

推荐答案

在此答案中: Cmake无法为Visual Studios 10 amd64配置项目

I找到了我的问题的解决方案。

I found the solution of my problem.

对我来说是


我发现了我的x64编译器通过安装SP 1被销毁。请尝试通过以下更新将其还原: http://www.microsoft.com/zh-cn/download/details.aspx?id=4422

我已经更新了编译器,现在可以使用了。

I have updated the compilers and now it works.

这篇关于CMake cl.exe无法编译简单的测试程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆