我在我的Boost.Python配置/安装?在
我试图编译教程示例,但我得到了一个错误:找不到libboost_python
cd /usr/share/doc/libboost1.42-doc/examples/libs/python/example/tutorial
bjam
error: Unable to find file or target named
error: 'libboost_python'
error: referred from project at
error: '.'
但是库在那里,ldconfig.real
已经运行:
我使用的是Ubuntu11.04中的默认libboost包。在
我的user-config.jam
是
using python : 2.7 ;
我在ubuntu12.04上也遇到了类似的问题,我把所有的boost库都作为一个包安装了。我在这里找到了解决办法:
http://jayrambhia.wordpress.com/2012/06/25/configuring-boostpython-and-hello-boost/
事实证明,你根本不需要使用bjam。一个makefile就足够了。我将在这里重复上述链接中的解决方案:
1.)安装libboost python包
2.)创建一个名为“hello_ext.c”的hello world源文件:
3.)创建生成文件:
^{pr2}$4.)品牌
5.)随时可用。在python中:
你可以有一个站点配置文件,包含如下内容:
(您需要<;library>;位,不确定原因)
然后你就可以像这样做了。在
^{pr2}$从长远来看,这会使事情变得更简单,因为在某个时刻,您不可避免地要更改boost版本。在
仍然不确定这是正确的方法,似乎有点老套,但以下内容有所帮助:
在
Jamroot
文件中被替换与
^{pr2}$相关问题 更多 >
编程相关推荐