Error with swig: undefined symbol: _ZN7hosters11hostersLink7getLinkEi

Posted by Eduardo on Stack Overflow See other posts from Stack Overflow or by Eduardo
Published on 2010-03-24T22:00:04Z Indexed on 2010/03/24 22:03 UTC
Read the original article Hit count: 245

Filed under:
|
|

I'm trying to make a python binding for the this library:

http://code.google.com/p/hosterslib/.

I'm using swig, heres is the code:

%module pyhosters

%{

include "hosters/hosters.hpp"

%}

%include "hosters/hosters.hpp"

I run "swig -c++ -python -o swig_wrap.cxx swig.i"

and I compile with "g++ -O2 -fPIC -shared -o _pyhosters.so swig_wrap.cxx python-config --libs --cflags -lhosters -lcln -lhtmlcxx pkg-config libglog --libs --cflags -I/usr/include/python2.6 -Wall -Wextra"

But when I run python and I import it, I get:

import pyhosters

Traceback (most recent call last):

File "", line 1, in

File "./pyhosters.py", line 7, in

import _pyhosters

ImportError: ./_pyhosters.so: undefined symbol: _ZN7hosters11hostersLink7getLinkEi

How can I solve that?

Thanks.

© Stack Overflow or respective owner

Related posts about swing

Related posts about c++