【问题标题】:Can't install boost to another directories无法将 boost 安装到其他目​​录
【发布时间】:2014-09-18 02:08:54
【问题描述】:

我只想使用 Boost 库的文件系统。我想要指定目录中的标题和二进制文件。

所以我做了什么:

下载 boost (filetype:tar.gz) 并解压到 ~/boost_1_55_0

运行 bootstrap.sh 如下:./bootstrap.sh --with-libraries=filesystem --libdir=~/boost155/lib --includedir=~/boost155/header/

bootstrap 生成的 project-config.jam 详情:

# Boost.Build Configuration
# Automatically generated by bootstrap.sh

import option ;
import feature ;

# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.
if ! gcc in [ feature.values <toolset> ]
{
    using gcc ; 
}

project : default-build <toolset>gcc ;

# List of --with-<library> and --without-<library>
# options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries =  --with-filesystem ;

# These settings are equivivalent to corresponding command-line
# options.
option.set prefix : /usr/local ;
option.set exec-prefix : /usr/local ;
option.set libdir : ~/boost155/lib ;
option.set includedir : ~/boost155/header/ ;

# Stop on first error
option.set keep-going : false ;

然后我运行 ./b2

命令结果:

link.jam: No such file or directory

Building the Boost C++ Libraries.



Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - context                  : not building
    - coroutine                : not building
    - date_time                : not building
    - exception                : not building
    - filesystem               : building
    - graph                    : not building
    - graph_parallel           : not building
    - iostreams                : not building
    - locale                   : not building
    - log                      : not building
    - math                     : not building
    - mpi                      : not building
    - program_options          : not building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - signals                  : not building
    - system                   : not building
    - test                     : not building
    - thread                   : not building
    - timer                    : not building
    - wave                     : not building

...patience...
...found 496 targets...


The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    /home/esys/boost_1_55_0

The following directory should be added to linker library paths:

    /home/esys/boost_1_55_0/stage/lib

如您所见,b2 不会在我想要的目录中安装库和头文件。我还检查了文件夹,它是空白的。

我猜问题是缺少链接。jam。但是在互联网上搜索什么也没给我。

任何想法都将不胜感激:)

【问题讨论】:

  • 可以手动复制头文件和二进制文件,但我不知道为什么b2 不将这些文件复制到指定文件夹中?

标签: c++ linux boost build


【解决方案1】:

你必须跑

./b2 install

而不是简单

./b2

(通过doc

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-20
    • 1970-01-01
    • 1970-01-01
    • 2021-06-18
    相关资源
    最近更新 更多