gpt4 book ai didi

c++ - 无法将 boost 安装到其他目​​录

转载 作者:太空宇宙 更新时间:2023-11-04 11:06:42 26 4
gpt4 key购买 nike

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

所以这是我所做的:

下载 boost(文件类型: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 没有在我想要的目录中安装库和 header 。我也检查了文件夹,它是空白的。

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

任何想法将不胜感激:)

最佳答案

你必须跑

./b2 install

而不是简单地

./b2

(通过 doc )

关于c++ - 无法将 boost 安装到其他目​​录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24968966/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com