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
C API in debug fails #65491
Comments
Although not a bug, it annoys me enough that it is a bug in my head! The problem is that trying to compile an application in debug that embeds Python fails. Case in point; we canned the idea of embedding Python (went with Lua) for that reason only. We did not have the option of incorporating a Python build into our build system and not being able to compile in debug was not an option either. We would have been happy to compile in debug with a release lib of Python, but since it was not possible, it got killed. The fix: It should be possible for someone to compile an application in debug that embeds python without having the Python debug libraries. |
Is that under Windows? |
It is under windows |
A bit more info:
|
I think the issue is actually slightly different. You can certainly build your Python "in debug", and still link with the release mode Python. The question is what "in debug" means, and the normal definition would be "with the generation of debug symbols by the compiler". What you cannot do is
We could fix 1, i.e. allowing you to define _DEBUG, and still bind the release version. I think we cannot reasonably fix 2; this is a Microsoft issue. You can work around by simply not defining _DEBUG, and still build "in debug" |
Indeed, but not defining _DEBUG for debug compiling is not realistic. Too many dependencies. I am not even sure it would work, because if we bind with the debug libraries, but build with the "release" headers, it might break. In any case it is not an option we have on the table at this moment. As for the linking part, I am not sure I am following you. Your runtime libraries and DLLs should not need to be linked to anything. They may be dependent on the release msvcrt, and that is fine (like I said, we can live with the Python parts in release). We have many other such libraries that are only in release mode (even when we build in debug). |
Since Python 3.8, Python built in debug mode is ABI compatible with Python built in release mode. There is no activity on this issue for 9 years. I close the issue. |
This is not quite true for Windows, but as long as you don't expect consistent process-wide state then it's usually fine. Even so, there's nothing for us to fix here, so closing the issue is correct. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: