[vtk-developers] Trouble with libvtkRenderingPythonTkWidgets.so

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sat Aug 31 23:45:33 EDT 2002


hi,

I updated my sources and wanted to test the new PLOT3D reader and
start some work on the Python testing interface.  However I'm having
difficulty with getting the TkWidgets working at all.

I ran Wrapping/Python/vtk/tk/vtkTkRenderWidget.py only to get this.


$ python vtkTkRenderWidget.py
Traceback (most recent call last):
  File "vtkTkRenderWidget.py", line 439, in ?
    vtkRenderWidgetConeExample()
  File "vtkTkRenderWidget.py", line 416, in vtkRenderWidgetConeExample
    pane = vtkTkRenderWidget(root,width=300,height=300)
  File "vtkTkRenderWidget.py", line 65, in __init__
    vtkLoadPythonTkWidgets(master.tk)
  File "/skratch/prabhu/vtk/cvs/VTK/Wrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py", line 59, in vtkLoadPythonTkWidgets
    interp.call('load', filename)
TclError: couldn't load file "libvtkRenderingPythonTkWidgets.so": /skratch/prabhu/vtk/cvs/VTK/lib/libvtkRenderingPythonTkWidgets.so: undefined symbol: vtkPythonUnmanglePointer__FPcPiPCc

Now, vtkPythonUnmanglePointer is defined in Common/vtkPythonUtil.h and
libvtkRenderingPythonTkWidgets.so is not linked to vtkCommonPython.  

Sure enough, adding a -lvtkCommonPython to the compilation command
fixed the error.  Should I go ahead and change
Rendering/CmakeLists.txt like so?

     ADD_LIBRARY(vtkRenderingPythonTkWidgets SHARED
                 ${RenderingPythonTkWidgets_SRCS})
     TARGET_LINK_LIBRARIES (vtkRenderingPythonTkWidgets
                            vtkRendering
-->                         vtkCommonPython
                            ${TCL_LIBRARY}
                            ${TK_LIBRARY})
     INSTALL_TARGETS(/lib/vtk vtkRenderingPythonTkWidgets)


Or is there something amiss and the correct solution is elsewhere?

cheers,
prabhu



More information about the vtk-developers mailing list