[英]How to export only a subset of header-only boost libraries?
From the boost library, I only require circular_buffer for an android project (maybe some other later, but it will always be header-only).从 boost 库中,我只需要针对 android 项目的 circular_buffer (以后可能还有其他项目,但它总是只有标题)。 Thus, I would like to create a distribution containing only the required files.
因此,我想创建一个只包含所需文件的发行版。
I tried using the official distribution, and executing:我尝试使用官方发行版,并执行:
./bootstrap.sh --includedir=.. --with-libraries=circular_buffer
However, when I then execute:但是,当我执行时:
./b2
It outputs:它输出:
error: wrong library name 'circular_buffer' in the --with-<library> option.
What am I doing wrong?我究竟做错了什么?
Bootstrap and b2 are only required for building library binaries.只有在构建库二进制文件时才需要 Bootstrap 和 b2。 As you said, you will use header-only only, so that's not required.
正如您所说,您将仅使用标头,因此这不是必需的。
You can just zip up the boost/
include folders and be happy.您只需将 zip 向上
boost/
包含文件夹即可。
In theory you can prune the set of includes with BCP: https://www.boost.org/doc/libs/1_75_0/tools/bcp/doc/html/index.html理论上,您可以使用 BCP 修剪包含的集合: https://www.boost.org/doc/libs/1_75_0/tools/bcp/doc/html/index.html
However, in practice I doubt it's worth the effort.然而,在实践中,我怀疑这是否值得。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.