无法建立Boost.Python的 [英] Unable to build Boost.Python

查看:577
本文介绍了无法建立Boost.Python的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立Boost.Python的。在此之后链接建设它。
早些时候,当我跑使用编译 ./ B2 ./的bjam ,我越来越像错误

I am trying to build boost.python. Following this link for building it. Earlier, when I ran to compile using ./b2 or ./bjam, I was getting error like

error: No best alternative for /python_for_extensions 
next alternative: required properties: <python>2.6 <target-os>linux 
    matched 
next alternative: required properties: <python>2.6 <target-os>linux 
    matched

不来的错误,当我加入这一行

The error was not coming when I added this line

使用python:2.6:/usr/bin/python2.6:/usr/include/python2.6:/usr/lib/python2.6:其中,蟒蛇调试&gt;在;

/home/kchaitanya/boost/boost_1_50_0/tool​​s/build/v2/user-config.jam 。这个错误已得到解决。

/home/kchaitanya/boost/boost_1_50_0/tools/build/v2/user-config.jam. This error is resolved.

不过,即使是现在,当我尝试编译它的表现编译时错误因为没能找到头文件。就在错误的一小摘录如下:

But, even now when I try to compile its showing compile time errors for not being able to find header files. Just a small excerpt of the errors is as follows.

 ...patience...
 ...patience...
 ...found 1548 targets...
 ...updating 62 targets...
 gcc.compile.c++ bin.v2/libs/python/build/gcc-4.1.2/release/link-static/threading multi/numeric.o

 In file included from ./boost/python/detail/prefix.hpp:13,
             from ./boost/python/numeric.hpp:8,
             from libs/python/src/numeric.cpp:6:
 ./boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory
 ./boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory
 ./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for 
 ./boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory
 ./boost/python/instance_holder.hpp:34: error: ‘PyObject’ has not been declared
 ./boost/python/instance_holder.hpp:41: error: expected ‘;’ before ‘(’ token
 ./boost/python/instance_holder.hpp:45: error: ‘PyObject’ has not been declared
 ./boost/python/detail/wrapper_base.hpp:21: error: expected initializer before ‘*’ token
 ./boost/python/detail/wrapper_base.hpp:23: error: expected initializer before ‘*’ token

需要建设这个Boost.Python的帮助。

Need help on building this boost.python.

推荐答案

问题不安装中的python-DEVEL 蟒蛇-dev的相当于我的Python版本包。

The problem was not installing the python-devel or python-dev package corresponding to my python version.

在我的情况下,它是如此python2.6的

In my case it was python2.6 so

须藤yum的安装python26-DEVEL 的伎俩。

这篇关于无法建立Boost.Python的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆