toddy
(Todd)
1
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?
ben.boeckel
(Ben Boeckel (Kitware))
2
Looks like an include was missed in dd7554a61106a42cd088acd429ee895dd030a674 (@dgobbi).
ben.boeckel
(Ben Boeckel (Kitware))
3
toddy
(Todd)
4
Thanks. That got me to the next step; a link failure. Is this a cmake error?
toddy
(Todd)
5
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.
toddy
(Todd)
6
Has anyone actually build the Python wrappers with Visual Studio?
dgobbi
(David Gobbi)
7
I did a local build of master today with VS2017, and didn’t run into any issues.
BUILD_SHARED_LIBS:BOOL=ON
Python3_EXECUTABLE:FILEPATH=F:/Programs/Python39/python.exe
Python3_INCLUDE_DIR:FILEPATH=F:/Programs/Python39/include
Python3_LIBRARY:FILEPATH=F:/Programs/Python39/libs/python39.lib
VTK_PYTHON_VERSION:STRING=3
VTK_WRAP_PYTHON:BOOL=ON
I don’t see BUILD_SHARED_LIBS in your settings, maybe that’s the cause of the link failure?
toddy
(Todd)
8
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.
toddy
(Todd)
9
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.