scikit-build icon indicating copy to clipboard operation
scikit-build copied to clipboard

Debug not working on Windows

Open letmaik opened this issue 4 years ago • 0 comments

When using --build-type=Debug on Windows with MSVC then during link-time the following error is raised:

LINK : fatal error LNK1104: cannot open file 'python39_d.lib'

This is because the Python header files themselves pull in the right library by name but the logic in CMaker.get_python_library always uses the non-debug library, so during link the library isn't found: https://github.com/scikit-build/scikit-build/blob/c0741f9a1de9dd97e0a1e6f0b3b02fcd76221418/skbuild/cmaker.py#L366

I think instead on Windows CMaker should use _d suffixed libraries if the build type is Debug.

letmaik avatar Mar 27 '21 15:03 letmaik