Debug build fail: cannot open file 'python310.lib'

When building the Debug version of ParaView:

Linking CXX shared library bin\vtkWrappingPythonCore3.10-pv5.10d.dll

fails with this error

fatal error LNK1104: cannot open file ‘python310.lib’

Why is it even searching for python310.lib not python310_d.lib? Also, the Python3_LIBRARY option points to the python310.lib, so no clue why it can’t find it. It’s not an admin right’s issue because Debug without PARAVIEW_USE_PYTHON compiles just fine.

Any ideas?

This is Python.h using “autolinking”. There’s a #pragma in the header that tells the linker "link to python310.lib", but no path is provided, so you get this error. There’s a patch to Python (that hasn’t been accepted yet) to allow projects to skip this, but in the meantime, some have managed to do this, but I don’t remember exactly how.

Some folks who may have suggestions: @todoooo @jschueller @jcfr

https://discourse.vtk.org/t/error-building-vtk-with-python-wrappers-on-windows/7333

The easiest solution is to compile the RelWithDebInfo configuration.