在基于 bjam 的项目中链接到 boost_filesystem
我正在尝试为我自己的项目设置 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我从 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 :)