我对SWIG非常陌生。我尝试编译SWIG中给出的示例,但出现以下错误:
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import example
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "example.py", line 25, in <module>
_example = swig_import_helper()
File "example.py", line 21, in swig_import_helper
_mod = imp.load_module('_example', fp, pathname, description)
ImportError: ./_example.so: undefined symbol: _Py_RefTotal