title: Error with swig: undefined symbol: _ZN7hosters11hostersLink7getLinkEi
body: <p>I'm trying to make a python binding for the this library:</p>
  
  <p><a href="http://code.google.com/p/hosterslib/" rel="nofollow noreferrer">http://code.google.com/p/hosterslib/</a>.</p>
  
  <p>I'm using swig, heres is the code:</p>
  
  <pre><code>%module pyhosters    
  %{    
  #include "hosters/hosters.hpp"    
  %}    
  %include "hosters/hosters.hpp"
  </code></pre>
  
  <p>I run </p>
  
  <blockquote>
    <p>swig -c++ -python -o swig_wrap.cxx swig.i</p>
  </blockquote>
  
  <p>and I compile with </p>
  
  <blockquote>
    <p>g++ -O2 -fPIC -shared -o _pyhosters.so swig_wrap.cxx <code>python-config --libs --cflags</code> -lhosters -lcln -lhtmlcxx <code>pkg-config libglog --libs --cflags</code> -I/usr/include/python2.6 -Wall -Wextra</p>
  </blockquote>
  
  <p>But when I run python and I import it, I get:</p>
  
  <pre><code>&gt;&gt;&gt; import pyhosters    
  Traceback (most recent call last):    
    File "&lt;input&gt;", line 1, in &lt;module&gt;    
    File "./pyhosters.py", line 7, in &lt;module&gt;    
      import _pyhosters    
  ImportError: ./_pyhosters.so: undefined symbol: _ZN7hosters11hostersLink7getLinkEi
  </code></pre>
  
  <p>How can I solve that?</p>
  
  <p>Thanks.</p>