[vtkusers] Problems with VTK3.2

Ilmar Wilbers ilmarw at student.matnat.uio.no
Tue Mar 18 19:00:31 EST 2003


Hi...
I have searched the internet for days trying to figure this one out, but I
haven't been succesfull... I installed VTK3.2 on my laptop running Linux.
Eveything seems to in order, but when I try to compile to following simple
program, I get these errors:

ilmarw at linux:~/in229/vis/1/test> make
g++ -I/usr/include/vtk -DVTK_USE_IMAGING -Wno-deprecated -c sphere.C
g++ spheoe.o -L/isr/X11R6/lib -L/usr/lib -L/usr/lib -lVTKCommon
-lVTKGraphics -lVTKImaging -lVTKPatented -lGL -lXext -lX11 -lm -lXt -o sphere
sphere.o: In function `main':
sphere.o(.text+0x11): undefined reference to `vtkRenderer::New()'
sphere.o(.text+0x31): undefined reference to `vtkRenderWindow::New()'
sphere.o(.text+0x42): undefined reference to
`vtkRenderWindow::AddRenderer(vtkRenderer*)'
sphere.o(.text+0x4a): undefined reference to
`vtkRenderWindowInteractor::New()'
sphere.o(.text+0x5b): undefined reference to
`vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)'
sphere.o(.text+0x63): undefined reference to `vtkSphereSource::New()'
sphere.o(.text+0x6b): undefined reference to `vtkPolyDataMapper::New()'
sphere.o(.text+0x7c): undefined reference to
`vtkPolyDataSource::GetOutput()'
sphere.o(.text+0x88): undefined reference to
`vtkPolyDataMapper::SetInput(vtkPolyData*)'
sphere.o(.text+0x90): undefined reference to `vtkActor::New()'
sphere.o: In function `vtkRenderer::addActor(vtkProp*)':
sphere.o(.gnu.linkonce.t._ZN11vtkRenderer8AddActorEP7vtkProp+0x10:
undefined reference to `vtkViewport::AddProp(vtkProp*)'
collect2: ld returned 1 exit status
make: ***[sphere] Error 1


I used the following Makefile:


VTKINCDIR	= -I/usr/include/vtk
VTKLIBDIR	= /usr/lib
MESALIBDIR	= /usr/lib
LIBS		= -lVTKCommon -lVTKGraphics -lVTKImaging -lVTKPatented
-lGL -lXext -lX11 -lm -lXt
LDFLAGS		= -L/usr/X11R6/lib -L$(MESALIBDIR) -L$(VTKLIBDIR)
CXXFLAGS	=$(VTKINCDIR) -DVTK_USE_IMAGING -Wno-deprecated
CXX		= g++
TARGET		= sphere
SRCS		= $(TARGET).C
OBJS		= $(Target).o


The file I am trying to compile (sphere.C) is a very simple file, which I
have been able to compile at anotjer machine...

I am immensly grateful for all help...


Ilmar Wilbers



More information about the vtkusers mailing list