[vtkusers] Error Compiling Sample Code
Ashivni Shekhawat
shekhawat.ashivni at gmail.com
Tue May 22 14:08:18 EDT 2007
Hi!
I am new to vtk and to graphics and rendering.
I have installed vkt 5.0.3. When I try to compile the example code for
creating a sphere http://vtk.org/example-code.php I get the errors
appended. While it is apparent that I am not linking to the required
libraries, I could not find information on which libraries to link to
and how. Any suggestions?
Thanks in advance
-Ashivni.
$ gcc -Wno-deprecated try.cpp
/tmp/ccSQdQ8V.o: In function
`__static_initialization_and_destruction_0(int, int)':
try.cpp:(.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccSQdQ8V.o: In function `__tcf_0':
try.cpp:(.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccSQdQ8V.o: In function `main':
try.cpp:(.text+0x84): undefined reference to `vtkSphereSource::New()'
try.cpp:(.text+0xde): undefined reference to `vtkPolyDataMapper::New()'
try.cpp:(.text+0xec): undefined reference to `vtkPolyDataAlgorithm::GetOutput()'
try.cpp:(.text+0xfb): undefined reference to
`vtkPolyDataMapper::SetInput(vtkPolyData*)'
try.cpp:(.text+0x100): undefined reference to `vtkActor::New()'
try.cpp:(.text+0x129): undefined reference to `vtkActor::GetProperty()'
try.cpp:(.text+0x143): undefined reference to
`vtkProperty::SetColor(double, double, double)'
try.cpp:(.text+0x148): undefined reference to `vtkRenderer::New()'
try.cpp:(.text+0x150): undefined reference to `vtkRenderWindow::New()'
try.cpp:(.text+0x173): undefined reference to `vtkRenderWindowInteractor::New()'
try.cpp:(.text+0x188): undefined reference to
`vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)'
try.cpp:(.text+0x19a): undefined reference to `vtkRenderer::AddActor(vtkProp*)'
/tmp/ccSQdQ8V.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
More information about the vtkusers
mailing list