CMake配置失败。 “cl.exe不能编译简单的测试程序” [英] CMake configuring fails. "cl.exe is not able to compile a simple test program"

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

问题描述

我试图使用CMake为MSVC ++ 2010构建一个解决方案。因为我安装了Visual Studio 2012不再工作了。 CMake带有以下错误消息:
C编译器C:/ Program Files(x86)/ Microsoft Visual Studio
10.0 / VC / bin / cl.exe无法编译一个简单的测试程序。

I am trying to build a solution for MSVC++2010 using CMake. Since I installed Visual Studio 2012 that does not work anymore. CMake comes with the following error message: "The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" is not able to compile a simple test program."

在解决我的问题时,我发现了这个主题( Cmake是无法配置项目的视觉工作室10 amd64 ),虽然提出了我的问题,但解决方案

While searching a solution for my problem I found this topic (Cmake is Unable to Configure Project for Visual Studios 10 amd64) which though adresses my problem but the solution doesn't work for me.

任何帮助将非常感激。

推荐答案

我在Win7上也有同样的问题。

对我有用的是@Andre在评论中提出的建议:

I had the same problem on Win7.
What worked for me is what @Andre suggested in the comment:


    在您的VS安装目录中的 cl.exe 上右键单击 - >属性(确切的路径出现在CMake错误中);
  1. 选择兼容性标签;

  2. 在权限级别框中选中以管理员身份运行此程序。

  1. Right-Click->Properties on cl.exe in your VS install directory (the exact path appears in the CMake error);
  2. Choose the Compatibility Tab;
  3. Check "Run this program as administrator" in the "Privilege Level" box.

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

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