Debugging my Python extensions (win32)

Bjorn Pettersen BPettersen at NAREX.com
Wed May 15 16:50:06 EDT 2002


> From: Giorgenes Gelatti [mailto:Gelatti at exatas.unisinos.br] 
> 
> Compile your module in debug mode. If you have the problem 
> "pythonxx_d.lib not 
> found" do the following:
> In every #include <Python.h> you have in your file change it to:
>
> #ifdef _DEBUG

Should there be an #undef _DEBUG here? (otherwise I can't see what
difference it would make...)

> #include <Python.h>
> #define _DEBUG
> #else
> #include <Python.h>
> #endif
> 
> Well, with your dll linked ok, goto projects/settings menu.
> 1) In the debug options/Executable for debug section select 
> the python executable 
> (eg. c:\python22\python.exe
> 2) In working directory put the python directory (eg. c:\python22)

Excellent! Thanks!

-- bjorn





More information about the Python-list mailing list