【问题标题】:building boost with clang 3.8 on windows在 Windows 上使用 clang 3.8 构建提升
【发布时间】:2015-10-09 15:02:35
【问题描述】:

从一些谷歌搜索看来,clang 对 windows 的支持最近在改进,boost 对 clang 的支持也可能有所改进。但我对所有这些繁重的编译器配置内容还是很陌生,并且对 boost 很陌生,所以我不确定当前的状态到底是什么。

我正在尝试运行命令:

 b2 --build-dir=build toolset=clang --build-type=complete stage

www.boost.org/.../getting_started/windows 中第 5.2.4 节中的建议。

这在某种程度上确实有效,但是看着打印到屏幕上的日志我看到了一些令人担忧的事情:

  • 语句以 clang-linux.compile.c++.... 开头,即使我在 Windows 上。
  • 12 warnings generated.(或类似的)也许这些总是-Wunused-local-typedef,但我不确定。
  • 2 warnings and 8 errors generated(或类似的)如果有错误构建失败了?我应该如何知道 boost 的哪个组件没有正确构建,我可以做些什么来解决这个问题?

我不清楚我是否需​​要编译器 MSVC、IDE 的 Visual Stufio 和/或 MinGW,以及是否需要手动设置标志以传递给编译器?或许 clang+boost 还没有为 windows 做好准备?

最终我想使用boost.python,以后可能会使用boost.coroutine

大概如果我想在自己的项目中使用clang,我也需要用clang编译boost?

【问题讨论】:

标签: boost clang++


【解决方案1】:
bootstrap --with-toolset=clang-win
b2 toolset=clang-win

确保 clang.exe 在您的 PATH 中。

【讨论】:

  • 我正在运行第一个命令,但得到“无法构建 Boost.build 引擎”。当我检查日志时,它显示“未知工具集:vcunk”,“此脚本支持的工具集是:borland、como、gcc、gcc-nocygwin、intel-win32、metrowerks、mingw、vc11、vc12、vc14、vc141、vc142”
猜你喜欢
  • 2016-09-04
  • 1970-01-01
  • 1970-01-01
  • 2018-03-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多