如何用正确的路径建立提升

How to build boost with correct paths

本文关键字:建立 路径 何用正      更新时间:2023-10-16

我试图在我的Ubuntu 18 Linux系统上的单独路径中构建boost。我克隆了 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。所有构建的库都可以在那里找到。