<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 26, 2015 at 9:25 AM, Armin Wehrfritz <span dir="ltr"><<a href="mailto:dkxls23@gmail.com" target="_blank">dkxls23@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I have also tried to get the python wrapping working, but failed at various levels.<br>
A good starting point is the VTK wiki:<br>
<a href="http://www.vtk.org/Wiki/index.php?title=VTK/Python_Wrapping_FAQ" target="_blank">http://www.vtk.org/Wiki/index.<u></u>php?title=VTK/Python_Wrapping_<u></u>FAQ</a><br>
<br>
But the wiki is missing already the information to add<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
SET(VTK_WRAP_PYTHON_FIND_LIBS ON)<br>
INCLUDE("${VTK_CMAKE_DIR}/<u></u>vtkWrapPython.cmake")<br></blockquote></blockquote><div> </div><div>That wiki page was written for VTK developers, so it doesn't give much useful info for people who are building their own libraries, unfortunately.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Anyway, I figured that one out eventually by grepping the source code, and I also find my *.so files, but when I try to load the module I get an "undefined symbol" error:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
import vtkMyFilterPython<br>
------------------------------<u></u>------------------------------<u></u>---------------<br>
ImportError                               Traceback (most recent call last)<br>
<ipython-input-1-3c0a51434210> in <module>()<br>
----> 1 import vtkMyFilterPython<br>
<br>
ImportError: ./vtkMyFilterPython.so: : real_initvtkMyFilterPython<br>
</blockquote>
<br>
<br>
If somebody has any hint, I would be happy to learn more, though it's not a pressing matter for me.</blockquote><div><br></div><div>The undefined symbol error probably means that your python module doesn't include vtkMyFilterPythonInit.cxx, which is one of the files generated by vtk_wrap_python3().</div><div><br></div><div>Your cmake should include the Init.cxx as a source file when it builds the module, e.g.:</div><div><br></div><div>add_library(vtkMyFilterPython MODULE vtkMyFilterPythonInit.cxx)</div><div><br></div><div>Or, if that still doesn't fix the problem, then there might be an error in your add_library call for vtkMyFilterPythonD.</div><div><br></div><div> - David</div></div></div></div>