visual-studio-2012 - Cmake Visual Studio 2013 错误

标签 visual-studio-2012 cmake visual-studio-2013

我正在尝试通过 cmake gui 运行一个简单的程序,我收到以下输出。我不太确定问题出在哪里,请原谅我,因为我对此很陌生。我还卸载并安装了 visual studio 2012 和 2013,看看这是否会有所作为。我使用 Visual Studio 2013 作为编译器并得到以下配置错误。

我的环境是:
Windows 7 企业版 64 位
CMake 图形用户界面 2.8.12.2
Visual Studio 2013 专业版

The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler using: Visual Studio 12
Check for working C compiler using: Visual Studio 12 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
  12.0/VC/bin/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Users/PM&R/Desktop/CMakeFiles/CMakeTmp



  Run Build Command:C:\PROGRA~2\MSBuild\12.0\Bin\MSBuild.exe
  cmTryCompileExec3676669247.vcxproj /p:Configuration=Debug
  /p:VisualStudioVersion=12.0

  Microsoft (R) Build Engine version 12.0.21005.1


  [Microsoft .NET Framework, version 4.0.30319.18444]


  Copyright (C) Microsoft Corporation.  All rights reserved.





  Build started 3/31/2014 2:27:43 PM.


  Project
  "C:\Users\PM&R\Desktop\CMakeFiles\CMakeTmp\cmTryCompileExec3676669247.vcxproj"
  on node 1 (default targets).



  C:\Users\PM&R\Desktop\CMakeFiles\CMakeTmp\cmTryCompileExec3676669247.vcxproj(60,85):
  error MSB4025: The project file could not be loaded.  An error occurred
  while parsing EntityName.  Line 60, position 85.


  Done Building Project
  "C:\Users\PM&R\Desktop\CMakeFiles\CMakeTmp\cmTryCompileExec3676669247.vcxproj"
  (default targets) -- FAILED.





  Build FAILED.






  "C:\Users\PM&R\Desktop\CMakeFiles\CMakeTmp\cmTryCompileExec3676669247.vcxproj"
  (default target) (1) ->


    C:\Users\PM&R\Desktop\CMakeFiles\CMakeTmp\cmTryCompileExec3676669247.vcxproj(60,85): error MSB4025: The project file could not be loaded. An error occurred while parsing EntityName. Line 60, position 85.





      0 Warning(s)

      1 Error(s)





  Time Elapsed 00:00:00.02






  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


Configuring incomplete, errors occurred!
See also "C:/Users/PM&R/Desktop/CMakeFiles/CMakeOutput.log".
See also "C:/Users/PM&R/Desktop/CMakeFiles/CMakeError.log".

最佳答案

尝试在文件夹 C:/Tmp 中生成构建系统,以测试问题是否与损坏的缓存或路径问题有关。将其构建到问题中所述的文件夹中:

  • 检查您是否拥有“PM&R”个人文件夹的写入权限
  • 更改生成器时删除 cmake 缓存

关于visual-studio-2012 - Cmake Visual Studio 2013 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22769851/

相关文章:

.net - 目录内的 T4 模板

c# - 使用 Resharper 自动删除未使用的代码

sql - Visual Studio 2012 添加数据库并创建第一个名为 users 的表

c# - 发布网站获取空文件夹

haskell - 是否可以将 cmake 用于 Haskell 项目?

cmake - CTest 未检测到测试

c# - 在 C# 中将整数从数据库传递到另一种形式时未分配的局部变量

vb.net - Visual Studio 2012 Express - 缺少 slider 控件

c# - Visual Studio 2012 不显示文件夹已创建

c++ - 设置 OpenCV 和 .lib 文件