Hai friends,

I have a question which is very fundamental..

After installing boost python and bjam from ubuntu 9.04 repositories i can't find a clear detailed description about compiling and running the boost python program from it's tutorials .. Can any among you please tell me what are the options we need to be give to compile like

g++ filename path/to/boost etc.,

and run this hello world boost python program http://wiki.python.org/moin/boost.python/SimpleExample using and without bjam.

This is what i did. I created a c++ file named hello.cpp with the contents..

#include <string>

namespace { // Avoid cluttering the global namespace.

  // A couple of simple C++ functions that we want to expose to Python.

  std::string greet() { return "hello, world"; }
  int square(int number) { return number * number; }
}
#include <boost/python.hpp>
using namespace boost::python;

BOOST_PYTHON_MODULE(getting_started1)

{
    // Add regular functions to the module.
    def("greet", greet);
    def("square", square);
}

What should i do to make this as "a shared library and put it on the PYTHONPATH" as said in the tutorial?? (This question may sound trivial or silly but these are essential components that "must must" be included while writing a tutorial bcoz. it's gonna be read by people at all levels.. This 'll dampen the spirits of the beginner if he can't get to know how to compile and run it..). Please explain me in detail..
FYI:I'm using python 3.1

Thanks & Regards..

After many hours of googling i found the way to create shared libraries

g++ -c -fPIC hello.cpp -o hello.o
g++ -shared -Wl,-soname,libhello.so -o libhello.so  hello.o

I don't know whether it is right or wrong...... Now when i tried to compile it using

g++ -c -fPIC hello.cpp -o hello.o

i got the following error..

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 first.cpp:9:
/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:75:24: error: patchlevel.h: No such file or directory
/usr/include/boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python.
/usr/include/boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory
In file included from /usr/include/boost/python/cast.hpp:13,
                 from /usr/include/boost/python/handle.hpp:10,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/base_type_traits.hpp:24: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/base_type_traits.hpp:24: error: template argument 1 is invalid
/usr/include/boost/python/base_type_traits.hpp:30: error: ‘PyTypeObject’ was not declared in this scope
/usr/include/boost/python/base_type_traits.hpp:30: error: template argument 1 is invalid
/usr/include/boost/python/base_type_traits.hpp:36: error: ‘PyMethodObject’ was not declared in this scope
/usr/include/boost/python/base_type_traits.hpp:36: error: template argument 1 is invalid
In file included from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/errors.hpp:51: error: expected constructor, destructor, or type conversion before ‘*’ token
In file included from /usr/include/boost/python/handle.hpp:13,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/handle_fwd.hpp:12: error: expected type-specifier before ‘PyObject’
/usr/include/boost/python/handle_fwd.hpp:12: error: expected ‘>’ before ‘PyObject’
In file included from /usr/include/boost/python/handle.hpp:14,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/refcount.hpp: In function ‘T* boost::python::incref(T*)’:
/usr/include/boost/python/refcount.hpp:16: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/refcount.hpp: In function ‘T* boost::python::xincref(T*)’:
/usr/include/boost/python/refcount.hpp:23: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/refcount.hpp: In function ‘void boost::python::decref(T*)’:
/usr/include/boost/python/refcount.hpp:30: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/refcount.hpp: In function ‘void boost::python::xdecref(T*)’:
/usr/include/boost/python/refcount.hpp:36: error: ‘PyObject’ was not declared in this scope
In file included from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/handle.hpp: In constructor ‘boost::python::handle<T>::handle(boost::python::detail::borrowed_reference_t*)’:
/usr/include/boost/python/handle.hpp:130: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/handle.hpp:130: error: expected primary-expression before ‘)’ token
/usr/include/boost/python/handle.hpp: At global scope:
/usr/include/boost/python/handle.hpp:157: error: ‘PyTypeObject’ was not declared in this scope
/usr/include/boost/python/handle.hpp:157: error: template argument 1 is invalid
/usr/include/boost/python/handle.hpp:157: error: invalid type in declaration before ‘;’ token
/usr/include/boost/python/handle.hpp:256: error: expected initializer before ‘*’ token
In file included from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/args_fwd.hpp:26: error: template argument 1 is invalid
In file included from /usr/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/instance_holder.hpp:34: error: ‘PyObject’ has not been declared
/usr/include/boost/python/instance_holder.hpp:41: error: expected ‘;’ before ‘(’ token
/usr/include/boost/python/instance_holder.hpp:45: error: ‘PyObject’ has not been declared
In file included from /usr/include/boost/python/object/pointer_holder.hpp:21,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/detail/wrapper_base.hpp:21: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:23: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:30: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:34: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:43: error: ‘PyObject’ has not been declared
/usr/include/boost/python/detail/wrapper_base.hpp:44: error: ‘PyObject’ is neither function nor member function; cannot be declared friend
/usr/include/boost/python/detail/wrapper_base.hpp:44: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:49: error: ‘PyTypeObject’ has not been declared
/usr/include/boost/python/detail/wrapper_base.hpp:55: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp: In constructor ‘boost::python::detail::wrapper_base::wrapper_base()’:
/usr/include/boost/python/detail/wrapper_base.hpp:46: error: class ‘boost::python::detail::wrapper_base’ does not have any field named ‘m_self’
/usr/include/boost/python/detail/wrapper_base.hpp: At global scope:
/usr/include/boost/python/detail/wrapper_base.hpp:61: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:71: error: expected initializer before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:77: error: variable or field ‘initialize_wrapper’ declared void
/usr/include/boost/python/detail/wrapper_base.hpp:77: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/detail/wrapper_base.hpp:77: error: ‘self’ was not declared in this scope
/usr/include/boost/python/detail/wrapper_base.hpp:77: error: expected primary-expression before ‘*’ token
/usr/include/boost/python/detail/wrapper_base.hpp:77: error: ‘w’ was not declared in this scope
/usr/include/boost/python/detail/wrapper_base.hpp:82: error: variable or field ‘initialize_wrapper’ declared void
/usr/include/boost/python/detail/wrapper_base.hpp:82: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/detail/wrapper_base.hpp:82: error: expected primary-expression before ‘,’ token
/usr/include/boost/python/detail/wrapper_base.hpp:82: error: expected primary-expression before ‘...’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:47,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:57,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:62,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:67,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:72,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:77,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:82,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:87,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:92,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:97,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:102,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:107,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:112,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:117,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:122,
                 from /usr/include/boost/python/object/pointer_holder.hpp:63,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:176: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:47,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:57,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:62,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:67,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:72,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:77,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:82,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:87,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:92,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:97,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:102,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:107,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:112,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:117,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:122,
                 from /usr/include/boost/python/object/pointer_holder.hpp:99,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/pointer_holder.hpp:199: error: expected `)' before ‘*’ token
In file included from /usr/include/boost/python/object/make_instance.hpp:9,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/instance.hpp:23: error: ‘PyObject_VAR_HEAD’ does not name a type
/usr/include/boost/python/object/instance.hpp:25: error: expected ‘;’ before ‘*’ token
In file included from /usr/include/boost/python/converter/registry.hpp:8,
                 from /usr/include/boost/python/converter/registered.hpp:8,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/to_python_function_type.hpp:15: error: expected initializer before ‘*’ token
In file included from /usr/include/boost/python/converter/rvalue_from_python_data.hpp:8,
                 from /usr/include/boost/python/converter/registry.hpp:9,
                 from /usr/include/boost/python/converter/registered.hpp:8,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/constructor_function.hpp:13: error: typedef ‘boost::python::converter::constructor_function’ is initialized (use __typeof__ instead)
/usr/include/boost/python/converter/constructor_function.hpp:13: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/converter/constructor_function.hpp:13: error: ‘source’ was not declared in this scope
/usr/include/boost/python/converter/constructor_function.hpp:13: error: expected primary-expression before ‘*’ token
/usr/include/boost/python/converter/constructor_function.hpp:13: error: expected primary-expression before ‘)’ token
In file included from /usr/include/boost/python/converter/registry.hpp:9,
                 from /usr/include/boost/python/converter/registered.hpp:8,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:65: error: ‘constructor_function’ does not name a type
In file included from /usr/include/boost/python/converter/registry.hpp:11,
                 from /usr/include/boost/python/converter/registered.hpp:8,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/convertible_function.hpp:10: error: typedef ‘boost::python::converter::convertible_function’ is initialized (use __typeof__ instead)
/usr/include/boost/python/converter/convertible_function.hpp:10: error: ‘PyObject’ was not declared in this scope
/usr/include/boost/python/converter/convertible_function.hpp:10: error: expected primary-expression before ‘)’ token
In file included from /usr/include/boost/python/converter/registered.hpp:8,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/registry.hpp:30: error: variable or field ‘insert’ declared void
/usr/include/boost/python/converter/registry.hpp:30: error: ‘to_python_function_t’ was not declared in this scope
/usr/include/boost/python/converter/registry.hpp:30: error: expected primary-expression before ‘)’ token
/usr/include/boost/python/converter/registry.hpp:33: error: expected ‘,’ or ‘...’ before ‘(’ token
/usr/include/boost/python/converter/registry.hpp:37: error: variable or field ‘insert’ declared void
/usr/include/boost/python/converter/registry.hpp:37: error: ‘convertible_function’ was not declared in this scope
/usr/include/boost/python/converter/registry.hpp:38: error: ‘constructor_function’ was not declared in this scope
/usr/include/boost/python/converter/registry.hpp:40: error: expected primary-expression before ‘)’ token
/usr/include/boost/python/converter/registry.hpp:45: error: variable or field ‘push_back’ declared void
/usr/include/boost/python/converter/registry.hpp:45: error: ‘convertible_function’ was not declared in this scope
/usr/include/boost/python/converter/registry.hpp:46: error: ‘constructor_function’ was not declared in this scope
/usr/include/boost/python/converter/registry.hpp:48: error: expected primary-expression before ‘)’ token
In file included from /usr/include/boost/python/converter/registered.hpp:9,
                 from /usr/include/boost/python/object/make_instance.hpp:10,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/registrations.hpp:22: error: ‘convertible_function’ does not name a type
/usr/include/boost/python/converter/registrations.hpp:28: error: ‘convertible_function’ does not name a type
/usr/include/boost/python/converter/registrations.hpp:29: error: ‘constructor_function’ does not name a type
/usr/include/boost/python/converter/registrations.hpp:39: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/registrations.hpp:43: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/registrations.hpp:55: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/registrations.hpp:58: error: ‘to_python_function_t’ does not name a type
/usr/include/boost/python/converter/registrations.hpp: In constructor ‘boost::python::converter::registration::registration(boost::python::type_info, bool)’:
/usr/include/boost/python/converter/registrations.hpp:77: error: class ‘boost::python::converter::registration’ does not have any field named ‘m_class_object’
/usr/include/boost/python/converter/registrations.hpp:78: error: class ‘boost::python::converter::registration’ does not have any field named ‘m_to_python’
In file included from /usr/include/boost/python/object/make_instance.hpp:11,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/detail/decref_guard.hpp: At global scope:
/usr/include/boost/python/detail/decref_guard.hpp:12: error: expected `)' before ‘*’ token
/usr/include/boost/python/detail/decref_guard.hpp:16: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/detail/decref_guard.hpp: In destructor ‘boost::python::detail::decref_guard::~decref_guard()’:
/usr/include/boost/python/detail/decref_guard.hpp:13: error: ‘obj’ was not declared in this scope
/usr/include/boost/python/detail/decref_guard.hpp:13: error: ‘Py_XDECREF’ was not declared in this scope
/usr/include/boost/python/detail/decref_guard.hpp: In member function ‘void boost::python::detail::decref_guard::cancel()’:
/usr/include/boost/python/detail/decref_guard.hpp:14: error: ‘obj’ was not declared in this scope
In file included from /usr/include/boost/python/object/make_instance.hpp:12,
                 from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/detail/none.hpp: At global scope:
/usr/include/boost/python/detail/none.hpp:16: error: expected initializer before ‘*’ token
In file included from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/make_instance.hpp:22: error: expected initializer before ‘*’ token
/usr/include/boost/python/object/make_instance.hpp:61: error: expected initializer before ‘*’ token
/usr/include/boost/python/object/make_instance.hpp:66: error: ‘PyObject’ has not been declared
In file included from /usr/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/object/make_ptr_instance.hpp:22: error: ‘PyObject’ has not been declared
/usr/include/boost/python/object/make_ptr_instance.hpp:28: error: expected initializer before ‘*’ token
/usr/include/boost/python/object/make_ptr_instance.hpp:35: error: expected initializer before ‘*’ token
/usr/include/boost/python/object/make_ptr_instance.hpp:49: error: expected initializer before ‘*’ token
/usr/include/boost/python/object/make_ptr_instance.hpp:58: error: expected initializer before ‘*’ token
In file included from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/to_python_indirect.hpp:34: error: expected initializer before ‘*’ token
/usr/include/boost/python/to_python_indirect.hpp:42: error: expected initializer before ‘*’ token
/usr/include/boost/python/to_python_indirect.hpp:52: error: expected initializer before ‘*’ token
/usr/include/boost/python/to_python_indirect.hpp:72: error: expected initializer before ‘*’ token
/usr/include/boost/python/to_python_indirect.hpp:92: error: expected initializer before ‘*’ token
In file included from /usr/include/boost/python/converter/arg_to_python.hpp:14,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/arg_to_python_base.hpp:17: error: template argument 1 is invalid
In file included from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:9,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/shared_ptr_deleter.hpp:12: error: template argument 1 is invalid
/usr/include/boost/python/converter/shared_ptr_deleter.hpp:17: error: template argument 1 is invalid
In file included from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/shared_ptr_to_python.hpp:16: error: expected constructor, destructor, or type conversion before ‘*’ token
In file included from /usr/include/boost/python/converter/arg_to_python.hpp:17,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:12,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from first.cpp:9:
/usr/include/boost/python/converter/builtin_converters.hpp:27: error: expected constructor, destructor, or type conversion before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:28: error: expected constructor, destructor, or type conversion before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:29: error: expected constructor, destructor, or type conversion before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:30: error: expected constructor, destructor, or type conversion before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<bool>::arg_to_python(const bool&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:98: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<signed char>::arg_to_python(const signed char&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<unsigned char>::arg_to_python(const unsigned char&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘::PyLong_FromUnsignedLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp:102: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<short int>::arg_to_python(const short int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<short unsigned int>::arg_to_python(const short unsigned int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘::PyLong_FromUnsignedLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp:104: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<int>::arg_to_python(const int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<unsigned int>::arg_to_python(const unsigned int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘::PyLong_FromUnsignedLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp:105: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<long int>::arg_to_python(const long int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<long unsigned int>::arg_to_python(const long unsigned int&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘::PyLong_FromUnsignedLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp:106: error: ‘::PyInt_FromLong’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<char>::arg_to_python(const char&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:117: error: ‘do_return_to_python’ is not a member of ‘boost::python::converter’
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<const char*>::arg_to_python(const char* const&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:118: error: ‘do_return_to_python’ is not a member of ‘boost::python::converter’
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::arg_to_python(const std::string&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:119: error: ‘::PyString_FromStringAndSize’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp: In constructor ‘boost::python::converter::arg_to_python<float>::arg_to_python(const float&)’:
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: template argument 1 is invalid
/usr/include/boost/python/converter/builtin_converters.hpp:123: error: ‘::PyFloat_FromDouble’ has not been declared
/usr/include/boost/python/converter/builtin_converters.hpp: At global scope:
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: ‘PyObject’ declared as an ‘inline’ field
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: expected ‘;’ before ‘*’ token
/usr/include/boost/python/converter/builtin_converters.hpp:124: error: expected `;' before ‘}’ token
/usr/include/boost/python/converter/builtin_converters.hpp:124: 

If your compile can't find Python.h, you must add an include directory. On my system, I get

>>> from distutils import sysconfig
>>> sysconfig.get_python_inc()
'/usr/include/python2.6'

So for Python.h, I need the compiler option -I/usr/include/python2.6 .

If your compile can't find Python.h, you must add an include directory. On my system, I get

>>> from distutils import sysconfig
>>> sysconfig.get_python_inc()
'/usr/include/python2.6'

So for Python.h, I need the compiler option -I/usr/include/python2.6 .

Thanks Gribouillis.. Could you please tell me in detail?? Where i have to specify the python diectory.. like g++ /python/directory etc., and could you please tell me how to compile and link the boost python program...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.