bjam 找不到 boost 库
我从源代码构建了 boost,因为我需要最新版本来构建 pyopencv。 一切都很顺利。
但是,bjam 现在找不到 boost 库或包含文件,因为现在它们不再位于 /usr/lib 中,而是位于 /usr/local/lib 和 /usr/local/include 中。
(我确实将 /usr/local/lib 添加到 LD_LIBRARY_PATH)
现在 bjam 抱怨:
boost-build.jam:2: in module scope
rule using unknown in module
在我的 boost-build.jam 的第一行上写着:
using python;
How do I告诉 bjam 在哪里寻找包含?我查看了 Boost.Build 文档,但似乎无法弄清楚如何设置包含路径。
I've built boost from source because I need the latest version to build pyopencv with.
That all went fine.
However, bjam now can't find the boost libs or includes because now they're no longer in /usr/lib, now they're in /usr/local/lib and /usr/local/include.
(I did add /usr/local/lib to LD_LIBRARY_PATH)
Now bjam complains:
boost-build.jam:2: in module scope
rule using unknown in module
on the first line of my boost-build.jam which says:
using python;
How do I tell bjam where to look for includes? I've looked at the Boost.Build docs, but can't seem to make out how to set the include path.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是 Boost 标头未能找到(尚未),而是未能找到 BoostBuild2 源。您要么需要使用 Boost 树中的 BBV2 源,要么单独安装 BBv2(BBv2 安装说明 此处)。假设您阅读了有关如何开始使用该库的 Boost Python 文档(请参阅 BPL 文档).. 您还需要按照这些说明中有关如何修改启动/模板 BBv2 项目的说明进行操作,以使用 BBv2 构建您自己的 Python 扩展(请参阅修改示例项目,重新定位项目部分)。
另请注意,上面的行应该是:
using python ;
——即空格很重要。It's not the Boost headers failing to find (yet), it's the BoostBuild2 sources it's failing to find. You either need to use the BBV2 sources from the Boost tree, or install BBv2 separately (the BBv2 install is explained here). Assuming you read the Boost Python documentation on how to get started using that library (see the BPL docs).. You need to also follow the instructions on how to modify the startup/template BBv2 project in those instructions to build your own Python extensions using BBv2 (see the Modifying the Example Project, Relocate the Project section).
Also note that the line above you have should be:
using python ;
-- I.e. the spaces are important.