Undefined boost python symbol: boost::python::detail::init_module

早过忘川 提交于 2019-12-01 20:55:47

The undefined symbol is

boost::python::detail::init_module(char const*, void (*)())

not

boost::python::detail::init_module(PyModuleDef&, void (*)())

on http://www.boost.org/doc/libs/1_46_1/boost/python/module_init.hpp I see that the method signature has changed to the latter one in Python 3.

You should make sure that PY_VERSION_HEX is set correctly when the boost python headers are processed.

On my system, I see that this is e.g. defined in /usr/include/python3.1/patchlevel.h (but I had to install the python 3.1 development package first)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!