boost - 在 Windows 上使用 clang 3.8 构建 boost

标签 boost clang++

从一些谷歌搜索来看,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++....即使我在 window 上。
  • 12 warnings generated. (或类似的)也许总是这些是 -Wunused-local-typedef ,但我不确定。
  • 2 warnings and 8 errors generated (或类似的)如果有错误,构建失败了?我应该如何知道 boost 的哪个组件没有正确构建,我该怎么做才能解决这个问题?

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

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

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

    最佳答案

    bootstrap --with-toolset=clang-win
    b2 toolset=clang-win
    

    确保 clang.exe 在您的 PATH 中。

    关于boost - 在 Windows 上使用 clang 3.8 构建 boost ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33041534/

    相关文章:

    c++ - 在 Windows 上使用 boost::asio 发送组播性能不佳

    c++ - MPI 收集/减少操作困惑?

    c++ - 具有默认模板类型的默认构造函数的类型推导

    c++ - Clang++ 看不到 libc++

    clang - ThreadSanitizer (tsan) - 抑制文件 vs 黑名单文件

    c++ - Eclipse C++ 和 Boost BGL 的问题

    C++ 如何运行 2 boost :asio: io_context at the same time

    c++ - 将指针从 C++ 传递到 Python/w boost python?

    c++ - 是否有编译器警告会在函数返回后捕获代码?

    c++ - clang : error: unknown argument: '-fno-leading-underscore'