开发者

Linking to boost_filesystem in a bjam-based project

开发者 https://www.devze.com 2022-12-19 21:59 出处:网络
I\'m trying to set up Boost.Build for my own project, which references libboost_filesystem. When I run

I'm trying to set up Boost.Build for my own project, which references libboost_filesystem.

When I run

bjam release avg_asp

I get the following output:

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

I'd really appreciate some help getting this fixed...

~/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
    ;

~/s开发者_Go百科rc/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 ;

In the directory /home/andreas/lib/build/boost_1_42_0, I already did the following::

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

Any ideas?


All right, I got the answer from the boost-build mailing list. The problem is that I was using the boost-build / bjam from the Ubuntu repos, which is too old to build Boost 1.42. I uninstalled the Ubuntu version, and everything works fine now :)

0

精彩评论

暂无评论...
验证码 换一张
取 消