Search code examples
pythonboostbuilding

Boost.python building


really can't understand, how to build correctly project that uses boost.python. I've included boost_(python/thread/system)-mt. Here is simple module file:

#include <boost/python.hpp>
#include "script.hpp"
#include "boost/python/detail/wrap_python.hpp"

BOOST_PYTHON_MODULE(temp)
{
    namespace py = boost::python;

    py::def("PyLog", &engine::log);
}

Here is bulid log: http://dpaste.com/179232/. Can't imagine what I forgot.


System: arch linux;

ls /usr/lib |grep boost : http://dpaste.com/179233/


Solution

  • That looks like a missing library in link phase. All those undefined references are included in the Python library. You probably just need to add something like "-lpython2.5" to your last gcc command.