Issues linking nanobind extension on Windows in Debug mode (VS wants to linke the release lib of Python). #795
Replies: 2 comments 2 replies
-
I think the import declaration is in the Python headers ( |
Beta Was this translation helpful? Give feedback.
-
In my experience, using a Release build of Python works with extension modules with Debug symbols. During debugging in C++, you will only stop at your own written code (including code from nanobind). |
Beta Was this translation helpful? Give feedback.
-
So we're building Python extensions for our library with nanobind.
Now, since I needed to debug some things, I wanted to build the debug version of the extension.
The debug version of Python is installed and available.
However VS gives me a linker error.
It complains:
First strange thing: it looks for the non-debug lib, even though this is a debug build.
Second strange thing: This linker argument is nowhere to be found in the generated Visual Studio project files!
This is the search output through the project files:
I was searching through our code and pybind code for linker pragmas, nothing to be found. So I am officially out of ideas and wanted to ask if anyone has run into the problem or has some other tips where I could take a look.
Beta Was this translation helpful? Give feedback.
All reactions