-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix linking to the wrong Python library for Debug built type on Windows #514
Conversation
Hello @duburcqa, Thank for the PR.
|
The point is rather linking with the Python library that Boost::Python wants us to link with. The current implementation in Eigenpy is by-passing Boost::Python logics entirely. Even worst, only compilation units that includes "include/eigenpy/numpy.hpp" are affected, but not the others, which means that the whole project may end up linking against multiple Python libraries at the same time. To answer for question, it allows both, depending on whether the pragma definition "BOOST_PYTHON_DEBUG" is set. However, in practice what we want is linking with the release Python library even in debug, which is the default with Boost::Python but not with barebone Python (and hence not with numpy either). |
Hello @duburcqa, I don't really get why an header will change our linking behavior. If we want to embed the Python interpreter into our application, we need to link with libpython. Bug again, the libpython will be chosen by the build script (usually CMake). Did you have some document that explains your point ? I will try to test the Windows Debug behavior. |
Thank for the link. The first one explain well the issue. So on Windows, pyconfig.h (included by Python.h) can call some MSVC specific pragma to link against a DLL. I was able to reproduce the issue and the patch fixed it. I will modify the comment to precise it's a Windows specific issue. |
No description provided.