bjam 找不到 boost 库

发布于 2024-12-07 18:06:04 字数 463 浏览 7 评论 0原文

我从源代码构建了 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 技术交流群。

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

发布评论

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

评论(1

坏尐絯 2024-12-14 18:06:05

这不是 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.

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