[vtk-developers] Fixing VTK Python Installation

Brad King brad.king at kitware.com
Sat Aug 13 14:10:35 EDT 2005


Prabhu Ramachandran wrote:
> I just checked in the changes for this and am getting dllexport
> related errors on the Win32 VC builds.  
> 
>  http://www.vtk.org/Testing/Sites/dash13.kitware/Win32-vs60/20050813-0300-Nightly/BuildWarning.html
> 
>  http://www.vtk.org/Testing/Sites/dash12.kitware/Win32-vs70/20050813-0300-Nightly/BuildWarning.html
> 
> I thought the function defintions in vtkPythonUtil.h are all exported
> via VTK_PYTHON_EXPORT?  Do I need to sprinkle VTK_PYTHON_EXPORT for
> all the functions with the warnings?

The problem is that VTK_PYTHON_EXPORT is coded to export symbols from a
library called "vtkCommonPython" but now it needs to export from
"vtkCommonPythonD".  I've committed a fix.

Do you know why the suffix "D" was chosen?  It makes it look like a
debug library.  Should we switch to calling the shared libraries
"vtk*Python" and the loadable modules "vtk*PythonM"?  The actual names
of the python modules are not really public...they are used only inside
the vtk *.py code that loads them.

Also, these errors:

http://www.vtk.org/Testing/Sites/destiny.kitware/HP-UX-aCC/20050813-0300-Nightly/BuildError.html

are because vtkCommonPythonD is trying to link to the python library,
which is static on that machine.  Previously the VTK python shared
libraries only linked to the python library on windows.  Was this a bug?

On UNIX the symbols could be found because the executable that loaded
the libraries was linked to the python library and set to export its
symbols for use by loaded libraries.  I'm not sure this was completely
correct but it seemed to work.  I'm attempting to install a shared build 
of python to solve the problem but we should still resolve this issue.

-Brad



More information about the vtk-developers mailing list