[vtk-developers] New VTK build under Windows

David Gobbi dgobbi at irus.rri.ca
Mon Aug 6 11:14:13 EDT 2001


Yesterday I built the new VTK with python wrappers using CMake and
VC++6.0.  It looks like there a still a few pieces missing, and I
was wondering if I could add them in or if I should just wait.

I love the fact that the Windows build almost exactly mirrors the
UNIX build now.  But the build didn't work out-of-the-box for me,
the steps I had to take were:

- copy vtkCommonPythonInit.cxx et al from my UNIX build, edited
  out the 'X' bits and add a __declspec( dllexport ) to the init
  function & remove 'lib' from the init function name
- copy tkInt.h et al from my tcl/tk 8.3.3 distribution, because
  the ones that came with VTK CVS weren't working (wrong version?)
- tick the 'Shared' box in CMakeSetup, because otherwise
  vtkImagingPython.dll et al are build as static .lib files

After the build, I was able to use all my old python-vtk programs,
including those that used the vtkRenderWidget (though slight additional
modification was needed for this).

I have a couple suggestions wrt to the python build:
1) the modules should be named 'vtkCommonPython.{ext}' under both
   Windows and UNIX, I can't see any reason for them to be named
   'libvtkCommonPython.so' under UNIX.
2) there should be a 'vtkpythontk.py' module that handles the details
   of loading vtkPythonTkWidgets.dll/so into Tkinter (the same way that
   'vtkpython.py' handles the details of loading vtkCommonPython.dll/so
   et al into python).

Other than these quibbles, the way things are done is definitely
superior to the old vtk-python.

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario





More information about the vtk-developers mailing list