编译Boost库

3 投票
1 回答
3231 浏览
提问于 2025-04-16 13:30

我正在尝试在Arch Linux上构建boost库。

$ uname -a
Linux wincode 2.6.37-ARCH #1 SMP PREEMPT Fri Feb 25 07:53:43 CET 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ AuthenticAMD GNU/Linux

$ python --version
Python 3.2

$ ls /usr/include/python
python2.7/   python3.2mu/

$ ls /usr/lib/python
python2.6/ python2.7/ python3.1/ python3.2/ 

我使用aur-repo来构建它。自动编译的脚本可以在这里找到。

现在我遇到了:

./boost/python/*:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.

几乎在boost.python库的任何文件中。所以python出现了问题,boost找不到它。在编译结束时,我得到了:

...failed updating 336 targets...
...skipped 48 targets...
...updated 13264 targets...

有什么帮助吗?

1 个回答

0

快速在谷歌上搜索一下,可以找到这个链接:http://lists.boost.org/boost-build/2006/04/13457.php

简单来说,就是把你的 Python 包含目录添加到查找包含文件的路径中。

撰写回答