如何使用正确的路径构建提升
How to build boost with correct paths
我试图在 Ubuntu 18 Linux 系统的单独路径中构建提升。我克隆了 GIT 存储库,因为我想获得最新版本(软件包存储库仅提供旧版本)。我要使用的库是 boost::timer
.
这是我所做的:
git clone --recursive https://github.com/boostorg/boost.git
cd boost
./bootstrap.sh
./b2 headers
./b2
这种方法奏效了。但是我希望静态库位于不同的路径中。它被编译成这个路径:
.../boost/bin.v2/libs/timer/build/gcc-9/release/link-static/threading-multi/visibility-hidden/libboost_timer.a
此路径非常冗长,它包含编译器及其版本,这意味着我需要在更新 GCC 或更改编译器时更新路径。
我早就料到了:
.../boost/libs/timer/libboost_timer.a
我是不是做错了什么?展示位置是否符合预期?
好的,当仔细阅读构建输出时,即使像我这样的傻瓜也能注意到实际路径是 boost/stage/lib
。所有构建的库都可以在那里找到。
我试图在 Ubuntu 18 Linux 系统的单独路径中构建提升。我克隆了 GIT 存储库,因为我想获得最新版本(软件包存储库仅提供旧版本)。我要使用的库是 boost::timer
.
这是我所做的:
git clone --recursive https://github.com/boostorg/boost.git
cd boost
./bootstrap.sh
./b2 headers
./b2
这种方法奏效了。但是我希望静态库位于不同的路径中。它被编译成这个路径:
.../boost/bin.v2/libs/timer/build/gcc-9/release/link-static/threading-multi/visibility-hidden/libboost_timer.a
此路径非常冗长,它包含编译器及其版本,这意味着我需要在更新 GCC 或更改编译器时更新路径。
我早就料到了:
.../boost/libs/timer/libboost_timer.a
我是不是做错了什么?展示位置是否符合预期?
好的,当仔细阅读构建输出时,即使像我这样的傻瓜也能注意到实际路径是 boost/stage/lib
。所有构建的库都可以在那里找到。