[Insight-users] Re: Problems building ITK with wrapping on XP/OS X

Charl P. Botha c . p . botha at ewi . tudelft . nl
Wed, 10 Dec 2003 22:11:38 +0100


Brad King wrote:
> On Wed, 10 Dec 2003, Frank Lindseth wrote:

>>A binary install of Python do not provide any debug libraries, the
>>default build mode of CableSwing/ITK is debug. In my (Windows)-ignorance
>>I went for a binary python install and CableSwig/ITK release mode. If
>>debug mode was desirable I would have to build python from source and
>>generate the python debug libraries. Right??? Please enlighten me...
> 
> 
> This is correct.  For a binary install of python, only building
> CableSwing/ITK in Release configuration is expected to work.

There is an easy way around it... on my Windows builds, I always build 
with "RelWithDebInfo" but I use a binary installed Python.  To make this 
work (and the same trick will of course work for a "Debug" build of ITK 
and/or VTK), search for pyconfig.h in your Python install (it's there, 
trust me) and change the reference o python22_d.lib to python22.lib (or 
python23, whatever's applicable).  Also, comment out all occurrences of 
"#define Py_DEBUG".  You obviously won't be able to debug into Python, 
but you will be able to debug into ITK and/or VTK even via wrapped calls.

This works (and has been working) for me with VTK and ITK CVS for at 
least the last half-year and I use the Python bindings of VTK and ITK 
quite intensively.

HTH,
Charl

-- 
charl p. botha http://cpbotha . net/ http://visualisation . tudelft . nl/