[vtk-developers] New VTK tree : Python (Windows)

Sebastien BARRE sebastien at barre.nom.fr
Sun May 13 10:58:03 EDT 2001


At 08/05/2001 09:25, Ken Martin wrote:

OK, now that the small Cmake bug related to Python has been solved, I can 
get back to the new tree. The python wrappers build (almost) fine, there is 
still a little problem with vtkVRML, but I've posted a solution. The Tk 
widgets for Python are not included at the moment, because it requires a 
modification of CMake (we'll see later) :

Previously :

>The link failed :
>
>******************************
>Linking...
>     Creating library Release/vtkFilteringPython.lib and object
>Release/vtkFilteringPython.exp
>vtkCellLocatorPython.obj : error LNK2001: unresolved external symbol
>_PyVTKClass_vtkLocatorNew
>vtkColorTransferFunctionPython.obj : error LNK2001: unresolved external
>symbol _PyVTKClass_vtkScalarsToColorsNew
>[...]
>Release/vtkFilteringPython.dll : fatal error LNK1120: 10 unresolved
>externals
>Error executing link.exe.
>
>ALL_BUILD - 28 error(s), 0 warning(s)
>******************************
>
>I believe this is because the old vtkpython was one DLL and in the new build
>right now it is multiple DLLs, which means that the FooNew functions now
>need a VTK_EXPORT in their signature, which means a small mod to
>vtkWrapPython which I hasn't been done yet.
>
>Thanks for the feedback and feel free to take a stab at fixing up stuff.

Done. The VTK_EXPORT has been added. Now the link works fine.
I've committed the change. Is vtkWrapPython shared between both CVS trees ?

BTW, do you know how we could set a dependency between vtkWrapPython.c and 
all wrapped Python files ? Once I've modified vtkWrapPython.c, it was 
recompiled successfully, but no wrapped files was reparsed (and 
recompiled). I had to delete them, etc. Is there a Cmake command to add a 
dependency between whatever file or set of files and another file ?

I had to add the OpenGL source files to the Rendering/CMakeLists.txt Python 
section, they were missing.  I removed the dependency with vtkIO, as it was 
not needed, am I wrong ?

vtkIO was missing in Parallel/CMakeLists.txt (Python section).

Still a problem... The link fails :

Linking...
    Creating library Release/vtkHybridPython.lib and object 
Release/vtkHybridPython.exp
vtkVRMLImporterPython.obj : error LNK2001: unresolved external symbol 
"protected: static class vrmlPointerList *  vrmlPointerList::Heap" 
(?Heap at vrmlPointerList@@1PAV1 at A)
Release/vtkHybridPython.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I've send a solution to the vtkVRML maintainer privately. Should be fixed 
some day.
Then the TK widgets (and probably an enhancement to make to the CMakfe 
SOURCE_FILES command), and I will pass to David Gobby for the .py files :)





More information about the vtk-developers mailing list