【问题标题】:Do anyone know why I build boost on macOS but there's no boost::fiber lib created?有谁知道为什么我在 macOS 上构建 boost 但没有创建 boost::fiber lib?
【发布时间】:2020-10-07 23:27:28
【问题描述】:

我正在编写一些使用 boost::fiber 作为协程的代码。该代码在 Windows 上运行良好,但是当我将它(通过 git)克隆到 macOS 时,我发现 cmake 找不到 boost::fiber。

在 windows 和 macOS 上,我像 ./boostrap.sh --with-libraries=all(sudo) ./b2 install -a 一样自己构建和安装了 boost,此外我还在 Ubuntu 20.04 上构建了用于测试,在 linux 和 windows 上,生成了 libfiber.a 或 .so安装的文件夹。但在 macOS 上,没有。

我的 macbook air 已经完全重新安装了一周。我觉得macOS版本和clang版本应该非常非常接近最新。

我想知道是否有人去过那里并想出了如何在 macOS 上构建 boost::fiber?

谢谢。

【问题讨论】:

    标签: c++ macos boost build boost-fiber


    【解决方案1】:

    我想我找到了原因:boost::fiber需要c++17的一些新特性。

    使用以下命令,我可以在我的 mac(OS:10.15.5,gcc:Apple clang 版本 11.0.3)上构建和安装 boost::fiber:

    ./bootstrap.sh --with-libraries=all

    sudo ./b2 cxxflags=-std=c++17 install -a > out.txt 2>&1

    只需在此处备注命令即可。可能其他人会遇到同样的问题...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-22
      • 2018-12-22
      • 1970-01-01
      • 1970-01-01
      • 2011-04-26
      • 2011-01-21
      • 1970-01-01
      相关资源
      最近更新 更多