[vtkusers] Compiling VTK with debug version of Python on Windows

Андрей Траченко goodrone at gmail.com
Thu Feb 17 16:06:51 EST 2011


My environment and background is the following: I'm working on a
custom Python extension module (written in C++) and I'd like to debug
it on Windows. My Python scripts that use the extension module also
import and use VTK.

Python on Windows doesn't ship with debug libraries so I compiled them
from sources, including the python_d.exe application.

This setup works for me except for the VTK part, because python_d.exe
(which I use to run my scripts), while trying to "import vtk", looks
for *_d.pyd files instead of *.pyd files. A brief look over VTK
sources and CMakeLists files didn't give me an idea on how to compile
VTK Python wrapper libraries with the "_d" postfix.

AFAIK the "set_target_properties(... DEBUG_POSTFIX ...)" CMake command
can be used to add the _d postfix to the libraries' names.

How could I get the libraries with correct names (preferably without
VTK source code modifications)?

--
Andrew



More information about the vtkusers mailing list