Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2007-01-08 17:59:14


Voph Devel <voph.devel_at_[hidden]> writes:

> hello
>
> I'm entirely new to boost and also to python...
>
> For my first step I'm still having troubles for compiling my c++ code.
>
> just including <boost/python.hpp> leads my gcc to output these errors.
>
> g++ -O0 -g3 -Wall -c -fmessage-length=0 -oEnvPython.o ../EnvPython.cpp
> In file included from /usr/include/boost/python/detail/prefix.hpp:13,
> from /usr/include/boost/python/args.hpp:8,
> from /usr/include/boost/python.hpp:11,
> from ../EnvPython.h:4,
> from ../EnvPython.cpp:1:
>
> /usr/include/boost/python/detail/wrap_python.hpp:50:23: error:
> pyconfig.h: No such file or directory
> /usr/include/boost/python/detail/wrap_python.hpp:74:24: error:
> patchlevel.h: No such file or directory
> /usr/include/boost/python/detail/wrap_python.hpp:77:2: error: #error
> Python 2.2 or higher is required for this version of Boost.Python.
> /usr/include/boost/python/detail/wrap_python.hpp:141:21: error:
> Python.h: No such file or directory
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> ( and then a thousand lines of errors...)
>
> I didn't manually build boost and boost.python. I'm running Debian, and
> I have the corresponding .so files for boost and python in my usr/lib. I
> have python 2.3 2.4 and 2.5 installed.

Looks like Debian isn't set up to make the Python header files
available for inclusion without qualification. Try following the
first few examples in the Python (not Boost) 'C' API documentation.
If you see the same problems, e.g.

  Python.h: No such file or directory

Then you need to take this issue up with the Python and/or Debian folks.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net