问题
I have updated boost library from previous 1.54 (svn source) to 1.57 (git source). Although I used the same ./b2 params, destination directory doesn't contain ptr_container
library.
Directory with cloned repository correctly contains ptr_container library on this path:
boost_git/libs/ptr_container
I'm building it with following command:
./b2 --install --prefix=$SHL_PATH/boost -sNO_BZIP2=1 -sNO_ZLIB runtime-link=shared link=shared -j2 install
but without success.
Edit:
It seems that problem occurs only when building from git. When I downloaded zip package from boost site, destination directory correctly contains ptr_container.
This is a git commands I'm using to get source code:
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
I also tried to get latest boost version, but this version isn't usable at all. Directly after I executed ./b2, I'm getting weird error similar to this one: Buidling boost error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll'
I will be grateful for any hints how to correctly get&install boost from git repository.
回答1:
git clone https://github.com/boostorg/boost.git cd boost git checkout boost-1.57.0 git submodule update --init --recursive ./bootstrap.sh sudo ./b2 install sudo ./b2 headers
As pointed out by rivanov in the comments, ./b2 headers
does the trick to include the header-only files in the installation dir.
来源:https://stackoverflow.com/questions/27346593/boost-ptr-container-library-isnt-installed-after-compilation-from-source