How to get pre-built * debug * version of Python library (for example, Python27_d.dll) for Windows

First, I have to point out that my current development environment is MSYS + mingw-w64 + ActivePython under Windows 7 , and that on a normal day I am primarily a Linux developer, I don’t get the joy of getting or compiling a version of the Python library with debug symbols .

Ideally, I need both 32-bit and 64-bit versions of debugging the Python27.dll file. I want to be able to implement Python and implement Python extensions in C ++ and be able to invoke a seamless debugging system using gdb-7.4 , which I created for mingw-w64, and WingIDE for the pure Python side of things.

Building Python 2.7.3 from source using the mingw-w64 tool link is too problematic - and before anyone cries for me trying: I admit that this environment is not supported, but I thought I could be able to work it with a few reasonable patches (hacks) and:

make OPT='-g -DMS_WIN32 -DWIN32 -DNDEBUG -D_WINDOWS -DUSE_DL_EXPORT'

I was mistaken ... I gave up on posixmodule.c, since the effect of my changes became uncertain; YMMV.

I tried to build with Visual C ++ 2010 Express , but primarily a Linux developer, for me too much of a shock for culture today; Python project doesn't even import. Apparently, I need Visual C ++ 2008, but I'm already sure that I do not want to go this way, if at all possible ...

I am really surprised that there is no zip file providing the required DLL files somewhere on the Internet . ActiveState should really provide them as an extra download with every version of ActivePython they make - perhaps where paid support comes in; -).

What is the best way to get Python debug library files to fit my environment?

+8
python mingw-w64 gdb debug-symbols activepython
source share
2 answers

I just created CPython 2.7.5 in debug mode with Visual Studio 2012 Express (free).

I registered the process through the wiki page: https://wiki.python.org/moin/VS2012

+7
source share

The best way to create a debug version of Python for Windows is to use the Debug assembly in Visual Studio projects that come with the Python source, using the compiler version required for a specific version of Python, i.e. VS 2008.

There may be other ways, but this is by far the best way.

If you really need a 64-bit debug build, the best way is to buy a copy of VS 2008 (i.e. don't use the Express version). Perhaps you can create an AMD64 debug build using the 64-bit SDK compiler, but again, using officially supported procedures, this is the best way.

+4
source share

All Articles