[vtkusers] problem of building vtk program

shuang shuang112 at 163.com
Wed Apr 16 22:14:15 EDT 2003


Dear all:
    I installed vtk under redhat 8 correctly,and I can build and run examples of vtk by using cmake and make.But when I compile and build same example by using g++,I got the error as following:

$g++ -L/usr/local/lib/vtk -I/usr/local/include/vtk -I/usr/local/include/vtk  -I/usr/include/X11 Cone.cxx -o Cone

In file included from /usr/include/c++/3.2/backward/strstream:51,
                 from /usr/local/include/vtk/vtkIOStream.h:35,
                 from /usr/local/include/vtk/vtkSystemIncludes.h:49,
                 from /usr/local/include/vtk/vtkSetGet.h:31,
                 from Cone.cxx:26:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccwds0y0.o: In function `main':
/tmp/ccwds0y0.o(.text+0x11): undefined reference to `vtkConeSource::New()'
/tmp/ccwds0y0.o(.text+0x6a): undefined reference to `vtkPolyDataMapper::New()'
/tmp/ccwds0y0.o(.text+0x7b): undefined reference to `vtkPolyDataSource::GetOutput()'
/tmp/ccwds0y0.o(.text+0x87): undefined reference to `vtkPolyDataMapper::SetInput(vtkPolyData*)'
/tmp/ccwds0y0.o(.text+0x8f): undefined reference to `vtkActor::New()'
/tmp/ccwds0y0.o(.text+0xb1): undefined reference to `vtkRenderer::New()'
/tmp/ccwds0y0.o(.text+0xeb): undefined reference to `vtkRenderWindow::New()'
/tmp/ccwds0y0.o(.text+0x162): undefined reference to `vtkRenderer::GetActiveCamera()'
/tmp/ccwds0y0.o(.text+0x16b): undefined reference to `vtkCamera::Azimuth(double)'
/tmp/ccwds0y0.o: In function `vtkRenderer::AddActor(vtkProp*)':
/tmp/ccwds0y0.o(.gnu.linkonce.t._ZN11vtkRenderer8AddActorEP7vtkProp+0x10): undefined reference to `vtkViewport::AddProp(vtkProp*)'
collect2: ld returned 1 exit status

Can anyone tell me what is the reason?
thanks in advance!

Shuang
=============================================================
ÕæÕýVIPÏíÊÜ£¬ÏëÔõô»¨£¬¾ÍÔõô»¨£¡          http://vip.163.com
Äê¶ÈÊ®¼ÑÅ®ÐÔÕ¾µãÆÀÑ¡¿ªÈüÁË£¡               http://www.nease.net
°Ù·Ö°ÙÅ®ÓÑ - ´º¼¾Ñ¡ÃÀ»î¶¯!                http://love.163.com



More information about the vtkusers mailing list