Hi,
i need to expose some C++ methods to python and came accross boost.python.
I installed libboost-python1.42-dev on an Ubuntu machine and tried to work with
a
simple program found in the docs:
#include <iostream>
class Foo {
public:
void bar() {
std::cout << "Hello" << std::endl;
}
};
#include <boost/python.hpp>
#include <Python.h>
using namespace boost::python;
BOOST_PYTHON_MODULE(libboopyclass) {
boost::python::class_<Foo>("Foo")
.def("bar", &Foo::bar);
}
I build it using: gcc foo.cpp -I /usr/include/python2.6 -l python2.6 -l
boost_python
I get a huge error list indicating that objects like PyObject or PyTypeObject
could not be found,
the detailed output is available here: http://pastebin.com/TyN9dZ09
Has anyone an idea whats going on here? How can I get this minimal example to
work?
Regards,
Max
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig