<div dir="ltr">There needs to be an underscore after PyInit (e.g. PyInit_vtkCommonMathPython).</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 4, 2017 at 4:23 PM, Timothee Evain <span dir="ltr"><<a href="mailto:tevain@telecom-paristech.fr" target="_blank">tevain@telecom-paristech.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
With you suggestion, there are errors in pythonmodules.h (undeclared identifiers). The names of modules don't correspond anymore with the ones in the vtkpythonmodulesPythonLoadAllP<wbr>ythonModules() function.<br>
<br>
So I changed also this line in the vtkPythonWrapping.cmake (3 lines after your fix):<br>
<br>
PyImport_AppendInittab(name${<wbr>module}, init${module}Python);")<br>
into<br>
PyImport_AppendInittab(name${<wbr>module}, PyInit${module}Python);")<br>
<br>
But then, I get the same linking errors as usual :<br>
[...]<br>
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonMathPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllP<wbr>ythonModules(void)" (?<wbr>vtkpythonmodulesPythonLoadAllP<wbr>ythonModules@@YAXXZ)<br>
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonMiscPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllP<wbr>ythonModules(void)" (?<wbr>vtkpythonmodulesPythonLoadAllP<wbr>ythonModules@@YAXXZ)<br>
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonSystemPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllP<wbr>ythonModules(void)" (?<wbr>vtkpythonmodulesPythonLoadAllP<wbr>ythonModules@@YAXXZ)<br>
[...]<br>
<span class=""><br>
Tim<br>
<br>
<br>
----- Mail original -----<br>
De: "David Gobbi" <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
À: "Timothee Evain" <<a href="mailto:tevain@telecom-paristech.fr">tevain@telecom-paristech.fr</a>><br>
Cc: "VTK Users" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>, "Utkarsh Ayachit" <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br>
</span>Envoyé: Jeudi 4 Mai 2017 22:30:20<br>
<span class="im HOEnZb">Objet: Re: [vtkusers] Building VTK 7.1.1 with Python wrapping fail<br>
<br>
</span><div class="HOEnZb"><div class="h5">Hi Tomothee,<br>
<br>
I think I made a mistake in the first fix that I suggested.  The correct<br>
name of the init methods is PyInit_vtkXXPython(), so the code in<br>
vtkPythonWrapping.cmake should be this:<br>
<br>
      set (EXTERN_DEFINES "${EXTERN_DEFINES}\n  extern PyObject<br>
*PyInit_${module}Python();")<br>
<br>
Hopefully that will work.<br>
<br>
 - David<br>
<br>
<br>
</div></div></blockquote></div><br></div>