2014-07-26 34 views
0

我只想使用Boost庫的文件系統。我想要指定目錄中的頭文件和二進制文件。無法將提升安裝到其他目​​錄

所以在這裏我所做的:

下載升壓(文件類型:tar.gz的),並提取到〜/ boost_1_55_0

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

項目配置的詳細信息

# 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

:通過的.jam引導產生

結果命令:

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不安裝庫和頭在我想要的目錄。我也檢查該文件夾,它是空白的。

我想問題是一個link.jam丟失。但是搜索互聯網並沒有給我帶來什麼

任何想法,將不勝感激:)

+0

頭和二進制文件的手動複製會起作用,但我不知道爲什麼'b2'不會將這些文件複製到指定的文件夾中? – Tiana987642

回答

0

你必須運行

./b2 install 

,而不是簡單地

./b2 

(通過doc

+0

好的,謝謝:) – Tiana987642