如何仅导出 header-only 个 boost 库的子集?
How to export only a subset of header-only boost libraries?
在 boost 库中,我只需要 circular_buffer 一个 android 项目(也许以后会有其他项目,但它总是 header-only)。因此,我想创建一个只包含所需文件的分发版。
我尝试使用官方发行版,并执行:
./bootstrap.sh --includedir=.. --with-libraries=circular_buffer
但是,当我执行时:
./b2
它输出:
error: wrong library name 'circular_buffer' in the --with-<library> option.
我做错了什么?
Bootstrap 和 b2 仅在构建库二进制文件时需要。正如您所说,您将仅使用 header-only,因此这不是必需的。
您可以压缩 boost/
包含文件夹并开心。
理论上,您可以使用 BCP 删除包含的集合:https://www.boost.org/doc/libs/1_75_0/tools/bcp/doc/html/index.html
然而,在实践中我怀疑这样做是否值得。
在 boost 库中,我只需要 circular_buffer 一个 android 项目(也许以后会有其他项目,但它总是 header-only)。因此,我想创建一个只包含所需文件的分发版。
我尝试使用官方发行版,并执行:
./bootstrap.sh --includedir=.. --with-libraries=circular_buffer
但是,当我执行时:
./b2
它输出:
error: wrong library name 'circular_buffer' in the --with-<library> option.
我做错了什么?
Bootstrap 和 b2 仅在构建库二进制文件时需要。正如您所说,您将仅使用 header-only,因此这不是必需的。
您可以压缩 boost/
包含文件夹并开心。
理论上,您可以使用 BCP 删除包含的集合:https://www.boost.org/doc/libs/1_75_0/tools/bcp/doc/html/index.html
然而,在实践中我怀疑这样做是否值得。