【问题标题】:How to setup cmake on windows如何在 Windows 上设置 cmake
【发布时间】:2014-10-22 18:26:22
【问题描述】:

我正在尝试在 Windows 上编译一个需要 Cmake 和 boost 的程序。我安装了visual studio 2013 express,我无法让cmake编译程序。

cmake -G "Visual Studio 11 Win64" ..

-- The C compiler identification is unknown
-- The CXX compiler identification is unknow
CMake Error in :
No CMAKE_C_COMPILER could be found.

CMake Error in :
No CMAKE_CXX_COMPILER could be found.

【问题讨论】:

  • 你真的在 cmake 文件上运行过“配置”吗?你也可以考虑使用 cmake-gui.exe
  • 当我运行配置时,它说“配置过程中的错误”编辑:当我运行配置错误 MSB4019:导入的项目“C:\Microsoft.Cpp.Default.props”时,这似乎是错误没有找到。确认 声明中的路径正确,并且该文件存在于磁盘上。
  • 嗯,这似乎表明 cmake 文件有问题。在那种情况下,我会向程序的作者寻求帮助
  • 好吧,这并没有改变 configure 对您来说失败的事实(无论出于何种原因),因此您无法生成 Visual Studio 项目。最好的人仍然是程序的作者,因为她/他现在可能会导致这个错误
  • Visual Studio 11 Win64 是 Visual Studio 2013 的错误生成器。如果您使用 cmake-3.x,我相信您需要 Visual Studio 12 2013 Win64。

标签: c++ windows boost visual-studio-2013 cmake


【解决方案1】:

Visual Studio 11 Win64 是 Visual Studio 2013 的错误生成器。如果您使用的是 cmake-3.x,则需要使用 Visual Studio 12 2013 Win64 或 Visual Studio 12 Win64 用于 cmake-2.8.x。 visual studio generators is here 的列表。

【讨论】:

  • 昨晚深夜我才意识到这一点。不过,我仍然必须弄清楚我在安装 boost 时做错了什么。
猜你喜欢
  • 2015-10-16
  • 2011-08-16
  • 2012-04-04
  • 2018-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-03-30
  • 1970-01-01
相关资源
最近更新 更多