从 Boost C++ 库构建特定的库

Build specific library from Boost C++ Library

我构建了 boost 库以使用 boost 函数 split 和 format

我注意到split放在algorithm目录下,但是当我运行 --show-libraries获取库列表时,没有名为'algorithm'的库

当我构建整个 boost 时,我没有找到要添加到我的项目中的 lib 文件(我不想添加所有的库和 headers)。

如何构建这个特定的库?

当运行bootstrap--show-libraries:

The Boost libraries requiring separate building and installation are:

算法库未列出,甚至是 STL 等价物的模板 -> header-only。

boost::algorithm和boost::format都只是header,所以不需要构建。 您会在 include/boost/ 文件夹中找到两个 header 文件:

  • include/boost/算法/algorithm.hpp
  • include/boost/format.hpp