Replies: 1 comment 5 replies
|
The root cause is almost certainly a Release/Debug Python ABI mismatch, not a Conan bug per se. Official python.org builds on Windows ship Release-only binaries. When you generate a Debug VS project, CMake/pybind11 try to link against the debug Python libs (python3x_d.lib) and load _d.pyd extension modules — which most installations don't have. This is a known pybind11 pitfall (see pybind/pybind11#3403): find_package(Python) on a Debug config picks up the release interpreter but debug libraries, producing unresolved symbols / linker errors. Two practical paths:
In practice, option 1 (RelWithDebInfo) is what most projects mixing pybind11/Boost.Python with VS end up using for day-to-day mixed-mode debugging — it avoids the whole debug-CPython dependency chain while still letting you set breakpoints and step seamlessly between Python and C++. |

Uh oh!
There was an error while loading. Please reload this page.
Can anyone advise on whether they've succesfully set up a debugging environment that allows for stepping through the python elements & then seamlessly stepping into & out of the underlying C++ as needed? Is there a straightforward way to accomplish this? Conan seems to configure a RELEASE project for Visual Studio that compiles. But requesting a DEBUG build project generation... seems it gens an assortment of issues.
All reactions