Error building VTK with Python wrappers on Windows

I’m trying to build VTK with VS2017 and Python wrappers in debug mode and I’m seeing some strange errors. Can someone enlighten me please?

Looks like an include was missed in dd7554a61106a42cd088acd429ee895dd030a674 (@dgobbi).

Fixed here:

1 Like

Thanks. That got me to the next step; a link failure. Is this a cmake error?

I added python36.lib to the WrappingPythonCore project’s linker additional dependencies

and that worked but now I see the same problem in the other Python wrapper projects, so I’m guessing there’s a cmake issue here for Visual Studio.

Has anyone actually build the Python wrappers with Visual Studio?

I did a local build of master today with VS2017, and didn’t run into any issues.


I don’t see BUILD_SHARED_LIBS in your settings, maybe that’s the cause of the link failure?

BUILD_SHARED_LIBS is switched on, it was just filtered out of the tree view by the search term.

I did notice this though which got added when I was playing around with trying to build mpi4py.

I removed the NODEFAULTLIB linker flag and renamed the file python36.lib => python36_d.lib together with

Finally I was able to build a debug version of VTK with non-debug Python wrappers.

Alternatively building RelWithDebInfo in VS with VTK_WINDOWS_PYTHON_DEBUGGABLE=OFF worked as well.