[vtkusers] Building VTK 7.1.1 with Python wrapping fail

David Gobbi david.gobbi at gmail.com
Thu May 4 18:27:51 EDT 2017


There needs to be an underscore after PyInit (e.g.
PyInit_vtkCommonMathPython).

On Thu, May 4, 2017 at 4:23 PM, Timothee Evain <tevain at telecom-paristech.fr>
wrote:

> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170504/dc2293e5/attachment.html>


More information about the vtkusers mailing list