1

我正在尝试为我自己的项目设置 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

我真的很感谢一些帮助解决这个问题......

~/user-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/tools/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

有任何想法吗?

4

1 回答 1

0

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

于 2010-02-15T16:39:38.520 回答