[vtkusers] Undefined Symbol

Yi-Yu Chou chouyiyu at hotmail.com
Sat Jan 24 19:32:01 EST 2004


Hi !!

I am trying to build my own vtk class in an out of source location using 
CVS vtk.
Therefore, I try to follow the README in /VTK/Examples/Build/vtkMy/
1. copy vtkMy to a local place /home/gtg353c/vtkMy ( I didn't change the 
example codes)
2. ccmake. and make
3. get libvtkmyImagingPython.so in /home/gtg353c/vtkMy/bin
4. Go to /vtkMy/bin
5. run python
   
from vtkpython import *
from libvtkmyImagingPython import *
I got the following error message :
ImportError: ./libvtkmyImagingPython.so: undefined symbol: 
PyVTKClass_vtkImageToImageFilterNew
Is it a bug in this example ? or I have to fix the CMakeLists.txt ?
BTW, I also tried to do it in the vtk tree and I got the same result.

Then I tried the second method : follow the README in 
/VTK/Examples/Build/vtkLocal
I succeeded to build the example in an out of source place.
But when I changed the code from
class VTK_vtkLocal_EXPORT vtkLocalTest : public vtkObject
to :
class VTK_vtkLocal_EXPORT vtkLocalTest : public vtkImageToImageFilter
and I change the CMakeLists.txt as
# List the kits from VTK that are needed by this project.
SET(vtkLocal_LIBS
vtkCommon
vtkImaging
vtkFiltering
)
I ran ccmake. and make : I got vtkLocalPython.so in /vtkLocal/bin
But I got the error when importing it to python
ImportError: /home/gtg353c/test/vtkLocal/bin/libvtkLocal.so: undefined 
symbol: _ZN21vtkImageToImageFilter16CollectRevisionsERSo

Could you please tell me what's wrong with my code ?
Thanks a lot !!!!!!!

Best,
YY

_________________________________________________________________
免費試聽 MSN 英語學習:和真人老師線上學英文 http://www.msn.com.tw/english/ 




More information about the vtkusers mailing list