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

发布于 2024-08-21 09:12:45 字数 1924 浏览 6 评论 0原文

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

有什么想法吗?

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
    ;

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

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

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

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪花飘飘的天空 2024-08-28 09:12:46

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

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 :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文