This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年02月04日 19:45 by sgallou, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg235397 - (view) | Author: Sébastien Gallou (sgallou) | Date: 2015年02月04日 19:45 | |
Hi all, I installed Python (2.7.9) as binaries under Windows. I have trouble trying to compile my application embedding Python, in debug configuration. I have exactly the same problem as described here : http://www.cmake.org/pipermail/cmake/2013-January/053125.html The include file python.h selects automaticaly the library file to link with, but python27_d.lib (needed in debug configuration) is not provided by the installer. I don't find if this issue was already supported. Thanks, Sébastien Gallou |
|||
| msg235398 - (view) | Author: Steve Dower (steve.dower) * (Python committer) | Date: 2015年02月04日 19:47 | |
It's not supported. You'll need to get the Python 2.7 source code and rebuild the binaries under Debug. Python 3.5 will probably have the option to download and install debug versions of the binaries, but Python 2.7 won't be getting this. |
|||
| msg235399 - (view) | Author: Sébastien Gallou (sgallou) | Date: 2015年02月04日 19:52 | |
Thanks Steve for your quick answer. It's now clear for me. I will then apply this workaround : #ifdef PYTHON_USE_SOURCES #include <Python.h> #else #if defined WIN32 && defined _DEBUG #undef _DEBUG // Undef _DEBUG to use only release version of Python.lib. The debug version of Python.lib is not provided with the Windows installer version (https://www.python.org/downloads/windows/) #include <Python.h> #define _DEBUG #else #include <Python.h> #endif #endif // PYTHON_USE_SOURCES Sébastien Gallou |
|||
| msg235402 - (view) | Author: Steve Dower (steve.dower) * (Python committer) | Date: 2015年02月04日 20:32 | |
You'll also need to change your project to use the release version of the C Runtime library and undefine _DEBUG throughout, otherwise you'll get conflicts in things like memory allocators and alignment. It's not quite as simple as choosing another lib. |
|||
| msg235403 - (view) | Author: Sébastien Gallou (sgallou) | Date: 2015年02月04日 20:58 | |
So there is no mean to build my application in debug mode without rebuilding all Python ? |
|||
| msg235407 - (view) | Author: Steve Dower (steve.dower) * (Python committer) | Date: 2015年02月04日 21:51 | |
Afraid not. The closest you can get is building in Release with full debug symbols and no optimisations, which should al lest get you decent debugging. However, you won't get the extra memory check patterns or assertions throughout your code. |
|||
| msg235408 - (view) | Author: Sébastien Gallou (sgallou) | Date: 2015年02月04日 21:53 | |
Thanks Steve, I will try to build it (hope it will not be too difficult...). If I don't success, I will use your solution. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67582 |
| 2015年02月04日 21:53:38 | sgallou | set | messages: + msg235408 |
| 2015年02月04日 21:51:02 | steve.dower | set | messages: + msg235407 |
| 2015年02月04日 20:58:02 | sgallou | set | messages: + msg235403 |
| 2015年02月04日 20:32:40 | steve.dower | set | messages: + msg235402 |
| 2015年02月04日 19:52:33 | sgallou | set | status: open -> closed resolution: not a bug messages: + msg235399 |
| 2015年02月04日 19:47:36 | steve.dower | set | messages: + msg235398 |
| 2015年02月04日 19:45:04 | sgallou | create | |