链接到基于bjam的项目中的boost_filesystem

时间:2010-02-13 14:02:16

标签: boost linker bjam boost-build boost-bjam

我正在尝试为我自己的项目设置Boost.Build,它引用了libboost_filesystem。

当我跑步时

bjam release avg_asp

我得到以下输出:

andreas@rodin:~/src/libdoas/src/tools$ bjam release avg_asp -n
/home/andreas/lib/build/boost_1_42_0/Jamroot:637: in modules.load
rule targets.create-metatarget unknown in module Jamfile</home /andreas/lib/build/boost_1_42_0>.
/usr/share/boost-build/build/project.jam:312: in load-jamfile
/usr/share/boost-build/build/project.jam:68: in project.load
/usr/share/boost-build/build/project.jam:718: in project.use
/usr/share/boost-build/build/project.jam:94: in project.load-used-projects
/usr/share/boost-build/build-system.jam:105: in load-config
/usr/share/boost-build/build-system.jam:154: in load
/usr/share/boost-build/kernel/modules.jam:261: in import
/usr/share/boost-build/kernel/bootstrap.jam:132: in boost-build
/usr/share/boost-build/boost-build.jam:1: in module scope

我真的很感激帮助解决这个问题...

〜/用户config.jam中

# -----------------
# System libraries
# -----------------

project site-config ;
lib netcdf : : <name>netcdf ;

# ------------------------
# Include Boost libraries
# ------------------------

use-project /boost : /home/andreas/lib/build/boost_1_42_0 ;

〜/ SRC / libdoas / Jamroot中

project
    : requirements <include>/home/andreas/include/boost-1_42
    : requirements <include>include
    ;

〜/ SRC / libdoas / SRC / LIB / Jamfile中

lib libdoas : [ glob *.cpp ] /site-config//netcdf ;

〜/ SRC / libdoas / SRC /工具/ Jamfile中

exe avg_asp        : avg_asp.cpp /boost/filesystem//boost_filesystem ;
exe b3dcols_to_pgl : b3dcols_to_pgl.cpp ;

在目录/ home / andreas / lib / build / boost_1_42_0中,我已经执行了以下操作::

./bootstrap.sh --prefix=/home/andreas
bjam

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

好的,我从boost-build邮件列表中得到了答案。问题是我使用的是Ubuntu repos中的boost-build / bjam,它太旧了,无法构建Boost 1.42。我卸载了Ubuntu版本,现在一切正常:)