Cmake Visual Studio 2013错误

时间:2014-03-31 18:54:25

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

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

我的环境是:
Windows 7企业64位
Cmake gui 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".

1 个答案:

答案 0 :(得分:1)

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

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