このライブラリのpythonバインディングを作成しようとしています:
http://code.google.com/p/hosterslib/。
私はswigを使用しています。コードは次のとおりです。
%module pyhosters
%{
#include "hosters/hosters.hpp"
%}
%include "hosters/hosters.hpp"
走る
swig -c++ -python -o swig_wrap.cxx swig.i
そして私はコンパイルします
g++ -O2 -fPIC -共有 -o _pyhosters.so swig_wrap.cxx
python-config --libs --cflags
-lhosters -lcln -lhtmlcxxpkg-config libglog --libs --cflags
-I/usr/include/python2.6 -Wall -Wextra
しかし、Python を実行してインポートすると、次のようになります。
>>> import pyhosters
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "./pyhosters.py", line 7, in <module>
import _pyhosters
ImportError: ./_pyhosters.so: undefined symbol: _ZN7hosters11hostersLink7getLinkEi
どうすれば解決できますか?
ありがとう。