[vtkusers] Error while compiling a vtk program

Darshan Pai darshanpai at gmail.com
Thu Oct 21 17:12:57 EDT 2004


I have installed vtk3.42 in Solaris.

I am trying to run an sample example from the kitware site. Let name
it sample.cpp

I make an object file .. sample1.o

But i cant make an executable 

I set the library paths and all . But it just doesnt work . 

i use
g++ -o sample -lvtkRendering sample.o

the error is as follows

Undefined                       first referenced
 symbol                             in file
vtkPolyDataSource::GetOutput()      sample.o
vtkActor::GetProperty()             sample.o
vtkProperty::SetColor(float, float, float)sample.o
vtkRenderWindow::New()              sample.o
vtkRenderWindowInteractor::New()     sample.o
vtkRenderer::New()                  sample.o
vtkViewport::AddProp(vtkProp*)      sample.o
vtkActor::New()                     sample.o
vtkPolyDataMapper::SetInput(vtkPolyData*)      sample.o
vtkSphereSource::New()              sample.o
vtkPolyDataMapper::New()            sample.o
vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)       sample.o
ld: fatal: Symbol referencing errors. No output written to sample
collect2: ld returned 1 exit status

What am i missing here 

The code is the first on in Example code of kitware site ..

Thanx

Darshan



More information about the vtkusers mailing list