Hi everybody,<br><div class="gmail_quote">first of all, thank you for the ITK product: I found them very useful.<br>I&#39;m interested in using CSWIG to make a c++ wrapping of a different program, and trying to understand how it works from the examples. As far as I got these are the steps required to wrap a c++ extension with cswig:
<br>&nbsp;<br>1) Create a xml description of the c++ code<br>2) Create the index<br>3) Create the&nbsp; cable/swig wrapper<br>4) Compile the original class and the created wrapper&nbsp; in a&nbsp; shared&nbsp; lib<br>5) Load it into python (or whatever)
<br><br>Now I&#39;m creating a very small library called (guess how?)  hello.cxx<br><br>my actual pipeline is:<br>1)&nbsp; gccxml -fxml=hello.xml -DCSWIG -DCABLE_CONFIGURATION hello.cxx<br>2)&nbsp;&nbsp;&nbsp; cableidx hello.xml hello.idx<br>

3)&nbsp;&nbsp;&nbsp; cswig -ICableSwig-ITK-3.4.0/SWIG/Lib/
-ICableSwig-ITK-3.4.0/SWIG/Lib/python -module hello -noruntime -Cindex hello.idx
-Wall -o hello_wrap.cxx -python -c++ hello.xml<br>4) gcc -shared -o _hello.so hello.cxx hello_wrap.cxx -I/usr/include/python2.5/<br clear="all"><br>The commands complete correctly and I have the module _hello.so created.
<br>But when I try to use it from python it says:
<br>&quot;ImportError: ./_hello.so: undefined symbol: SWIG_Python_newvarlink&quot;<br><br>There seems to me that I&#39;m missing a library somewhere but where?<br><br>Thank you for every help!<br><font color="#888888"><br>
<br>Mario<br>
</font></div><br>