4

我已将 boost 库从以前的 1.54(svn 源)更新到 1.57(git 源)。虽然我使用了相同的 ./b2 参数,但目标目录不包含ptr_container库。

具有克隆存储库的目录正确包含此路径上的 ptr_container 库:

boost_git/libs/ptr_container

我正在使用以下命令构建它:

   ./b2 --install --prefix=$SHL_PATH/boost -sNO_BZIP2=1 -sNO_ZLIB runtime-link=shared link=shared -j2 install

但没有成功。


编辑:

似乎只有从 git 构建时才会出现问题。当我从 boost 站点下载 zip 包时,目标目录正确包含 ptr_container。

这是我用来获取源代码的 git 命令:

git clone --recursive https://github.com/boostorg/boost.git boost_git
git checkout tags/boost-1.57.0
git submodule foreach --recursive git checkout tags/boost-1.57.0  

我也尝试获取最新的 boost 版本,但这个版本根本不可用。在我执行 ./b2 之后,我得到了类似于这个的奇怪错误:Buidling boost error: Name conflict for '<pstage\lib>boost_system-vc120-mt-1_58.dll'

对于如何从 git 存储库正确获取和安装 boost 的任何提示,我将不胜感激。

4

1 回答 1

0
git 克隆 https://github.com/boostorg/boost.git
光盘提升
git checkout boost-1.57.0
git 子模块更新 --init --recursive
./bootstrap.sh
须藤 ./b2 安装
sudo ./b2 标头

正如rivanov在评论中指出的那样,./b2 headers在安装目录中包含仅标头文件的技巧。

于 2016-11-11T22:27:36.163 回答