[vtkusers] HELP! VTK & LINUX
Christos Panagiotou
cpanagio at cs.ucl.ac.uk
Wed Jul 2 01:24:26 EDT 2003
guys is there any problem with vtk linking in linux?
I installed the rpm nightly release as I thought i did something wrong
in the compilation of the src files (which I had the same problem that I
have with the rpm build). All headers were placed in /usr/include/vtk. I
linked the complier (I use KDevelop) to include this directory (-I
/usr/include/vtk) and I STILL have errors about _undefined methods._
I try to compile and run the sphere example shown in
http://www.vtk.org/example-code.php (which is supposed to show
functionality of VTK and I assume its tested) however I get all these
errors:
/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O0 -g3 -Wall -I
/usr/include/vtk -fno-exceptions -fno-check-new -o asm_3d main.o
./Globals/Functions/libFunctions.a
main.o(.text+0x11): In function `main':
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:43: undefined
reference to `vtkPolyData::New()'
main.o(.text+0x19):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:44:
undefined reference to `vtkPoints::New()'
main.o(.text+0x21):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:45:
undefined reference to `vtkCellArray::New()'
main.o(.text+0x29):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:46:
undefined reference to `vtkFloatArray::New()'
main.o(.text+0xbe):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:51:
undefined reference to `vtkDataArray::InsertTuple1(int, float)'
main.o(.text+0x105):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:56:
undefined reference to `vtkPolyData::SetPolys(vtkCellArray*)'
main.o(.text+0x134):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:58:
undefined reference to `vtkDataSetAttributes::SetScalars(vtkDataArray*)'
main.o(.text+0x151):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:62:
undefined reference to `vtkPolyDataMapper::New()'
main.o(.text+0x162):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:63:
undefined reference to `vtkPolyDataMapper::SetInput(vtkPolyData*)'
main.o(.text+0x188):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:65:
undefined reference to `vtkActor::New()'
main.o(.text+0x1aa):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:69:
undefined reference to `vtkCamera::New()'
main.o(.text+0x1cd):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:70:
undefined reference to `vtkCamera::SetPosition(double, double, double)'
main.o(.text+0x1e7):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:71:
undefined reference to `vtkCamera::SetFocalPoint(double, double, double)'
main.o(.text+0x1ef):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:73:
undefined reference to `vtkRenderer::New()'
main.o(.text+0x1f7):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:74:
undefined reference to `vtkRenderWindow::New()'
main.o(.text+0x219):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:77:
undefined reference to `vtkRenderWindowInteractor::New()'
main.o(.text+0x22a):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:78:
undefined reference to
`vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)'
main.o(.text+0x24c):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:81:
undefined reference to `vtkRenderer::SetActiveCamera(vtkCamera*)'
main.o(.text+0x25a):/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:82:
undefined reference to `vtkRenderer::ResetCamera()'
main.o(.gnu.linkonce.t._ZN11vtkRenderer8AddActorEP7vtkProp+0x10): In
function `vtkRenderer::AddActor(vtkProp*)':
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:43: undefined
reference to `vtkViewport::AddProp(vtkProp*)'
main.o(.gnu.linkonce.t._ZN14vtkIdTypeArray12WritePointerEii+0x24): In
function `vtkIdTypeArray::WritePointer(int, int)':
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:45: undefined
reference to `vtkIdTypeArray::ResizeAndExtend(int)'
collect2: ld returned 1 exit status
gmake[3]: *** [asm_3d] Error 1
gmake[3]: Leaving directory `/home/christos/VIVE02/project/asm_3d/asm_3d'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/christos/VIVE02/project/asm_3d/asm_3d'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/christos/VIVE02/project/asm_3d'
gmake: *** [all] Error 2
*** failed ***
I saw also this msg posted in a bulleting board:
GCC "Name Mangling" Prevent from Linking?
(http://gcc.gnu.org/ml/gcc-help/2002-04/msg00124.html)
Please anyone know something about this please email me
I would be greatfull for any replies
cheers
christos
More information about the vtkusers
mailing list