由买买提看人间百态

topics

全部话题 - 话题: boostpy
(共0页)
j***i
发帖数: 1278
1
来自主题: Programming版 - boost.python 入门问题
刚开始看,是了一下tutorial 的程序
/boostpy.cc
#include
char const* greet()
{
return "hello, world";
}
BOOST_PYTHON_MODULE(boostpy)
{
using namespace boost::python;
def("greet", greet);
}
g++ boostpy.cc -lpython2.5 -I /usr/include/python2.5 -o boostpy.so -shared
编译成了,
但在python import 出错
<< Traceback (most recent call last):
File "", line 1, in
ImportError: ./boostpy.so: undefined symbol: _ZN5boost6python6detail11init_
moduleEPKcPFvvE
(共0页)