j***i 发帖数: 1278 | 1 刚开始看,是了一下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 |
|