[PyQt] Debugging SIP wrapped C++ code with Visual Studio 2008

magnus.benjes at googlemail.com magnus.benjes at googlemail.com
Wed Aug 12 09:19:58 BST 2009


Hi,
does somebody know how to debug SIP wrapped C++ code with Visual Studio  
2008?

I have build a custom QWidget in C++ and wrapped it with SIP. I use this  
widget from Python with PyQt. I have figured out, that I need python_d.lib  
to compile the widget in debug mode and how to create python_d.lib.

In the VS 2008 project Debugging configuration I use the following  
configuration:
application: C:\Python26\python.exe
arguments: the Python script, which loads the SIP generated module
working directory: The directory of the Python script

The Python script crashes when it tries to load the SIP generated module  
and prints the following error message:
"Fatal Python error: Interpreter not initialized (version mismatch?)"


With Visual Studio 2003, Python 2.4 and swig I used this approach  
successfully to debug non Qt C++ components.

Regards
Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090812/23961ec4/attachment.html


More information about the PyQt mailing list