Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent useless link with pythonXX_d.lib in Debug mode #87

Merged
merged 1 commit into from
Sep 4, 2021

Conversation

hpwxf
Copy link
Collaborator

@hpwxf hpwxf commented Sep 3, 2021

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

On Windows, when CMAKE_BUILD_TYPE was Debug, I had a configuration where the linker looked for pythonXX_d.lib instead of pythonXX.lib.

Usually, pybind11 prevents that (as shown here: pybind/pybind11#1295).
Unfornutaly in ncalloc.h, there are NumPy includes but not the pybind11 include which manages that.

That's why I suggest adding pybind11 include before NumPy includes to prevent that.
(debug python lib is not commonly installed and if debug lib is wanted, using Py_DEBUG directive will help)

@RUrlus RUrlus merged commit 26a31fd into RUrlus:stable Sep 4, 2021
@RUrlus
Copy link
Owner

RUrlus commented Sep 4, 2021

Thanks for the PR @hpwxf. Merged, I'll create a patch release

@hpwxf hpwxf deleted the PR-fix-debug-dll-link branch September 4, 2021 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants