[vtkusers] Python wrapping example won't build on Mac OS X

Theodore D. Sternberg tdsternberg at lbl.gov
Fri Mar 12 20:00:32 EST 2004


The VTK 4.4 source code ships with a small example (in
Examples/Build/vtkLocal) of how to add classes to VTK and get them wrapped
for use from Tcl and Python.  It all builds and works wonderfully on
Linux, but on Mac OS X there are several problems:

1. The link line mentions both -lvtkCommonPython and -lvtkCommonPythonD, 
which fails.  You have to remove the -lvtkCommonPython.

2. CMake generates the crucial vtkLocalPythonInit.cxx file, but does not 
compile it.  Consequently, Python won't load libvtkLocalPython.so because 
it lacks the _initlibvtkLocalPython (which vtkLocalPythonInit.cxx 
defines).

I've put together a bundle that includes this example plus a couple of
shell scripts to drive the build and the test; if anyone wants it just
email me.

I'm using Mac OS X Darwin 7.2.0, Apple's "gcc3.3", the cmake 1.8.3 Mac OS
X binary from www.kitware.com, and VTK from the Kitware CVS site, tag
release-4-4.

Ted Sternberg
Lawrence Berkeley National Laboratory





More information about the vtkusers mailing list