[vtkusers] Building VTK 7.1.1 with Python wrapping fail

Timothee Evain tevain at telecom-paristech.fr
Thu May 4 18:23:47 EDT 2017


Hi David,

With you suggestion, there are errors in pythonmodules.h (undeclared identifiers). The names of modules don't correspond anymore with the ones in the vtkpythonmodulesPythonLoadAllPythonModules() function.

So I changed also this line in the vtkPythonWrapping.cmake (3 lines after your fix):

PyImport_AppendInittab(name${module}, init${module}Python);")
into
PyImport_AppendInittab(name${module}, PyInit${module}Python);")

But then, I get the same linking errors as usual :
[...]
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonMathPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllPythonModules(void)" (?vtkpythonmodulesPythonLoadAllPythonModules@@YAXXZ)
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonMiscPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllPythonModules(void)" (?vtkpythonmodulesPythonLoadAllPythonModules@@YAXXZ)
290>vtkPythonAppInit.obj : error LNK2019: unresolved external symbol PyInitvtkCommonSystemPython referenced in function "void __cdecl vtkpythonmodulesPythonLoadAllPythonModules(void)" (?vtkpythonmodulesPythonLoadAllPythonModules@@YAXXZ)
[...]

Tim


----- Mail original -----
De: "David Gobbi" <david.gobbi at gmail.com>
À: "Timothee Evain" <tevain at telecom-paristech.fr>
Cc: "VTK Users" <vtkusers at vtk.org>, "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com>
Envoyé: Jeudi 4 Mai 2017 22:30:20
Objet: Re: [vtkusers] Building VTK 7.1.1 with Python wrapping fail

Hi Tomothee,

I think I made a mistake in the first fix that I suggested.  The correct
name of the init methods is PyInit_vtkXXPython(), so the code in
vtkPythonWrapping.cmake should be this:

      set (EXTERN_DEFINES "${EXTERN_DEFINES}\n  extern PyObject
*PyInit_${module}Python();")

Hopefully that will work.

 - David




More information about the vtkusers mailing list