[vtkusers] Undefined reference error

Ankur Deshmukh adeshmuk at uccs.edu
Thu Nov 3 02:25:24 EST 2005


Hey,

I am running vtk on fedora core4. My include files are in 
/usr/local/include and my lib files are in /usr/local/lib/. My cmake 
complitation files are in /usr/local/bin. On building my source code i 
get the following errors:

cd '/root/myProject/texturemapping' && WANT_AUTOCONF_2_5="1" 
WANT_AUTOMAKE_1_6="1" gmake -j1
gmake all-recursive
Making all in src
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../src -g -O2 -MT 
texturemapping.o -MD -MP -MF ".deps/texturemapping.Tpo" -c -o 
texturemapping.o texturemapping.cpp; then mv -f 
".deps/texturemapping.Tpo" ".deps/texturemapping.Po"; else rm -f 
".deps/texturemapping.Tpo"; exit 1; fi
In file included from 
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/backward/strstream:51,
from /usr/local/include/vtk/vtkIOStream.h:32,
from /usr/local/include/vtk/vtkSystemIncludes.h:40,
from /usr/local/include/vtk/vtkIndent.h:24,
from /usr/local/include/vtk/vtkObjectBase.h:43,
from /usr/local/include/vtk/vtkObject.h:41,
from /usr/local/include/vtk/vtkViewport.h:32,
from /usr/local/include/vtk/vtkRenderer.h:32,
from texturemapping.cpp:23:
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/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 <iostream> 
instead of the deprecated header <iostream.h>. To disable this warning 
use -Wno-deprecated.
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o texturemapping 
texturemapping.o
g++ -g -O2 -o texturemapping texturemapping.o
texturemapping.o(.text+0x79): In function `main':
/root/myProject/texturemapping/src/texturemapping.cpp:50: undefined 
reference to `vtkRenderer::New()'
texturemapping.o(.text+0x81):/root/myProject/texturemapping/src/texturemapping.cpp:51: 
undefined reference to `vtkRenderWindow::New()'
texturemapping.o(.text+0x9d):/root/myProject/texturemapping/src/texturemapping.cpp:53: 
undefined reference to `vtkRenderWindowInteractor::New()'
texturemapping.o(.text+0xac):/root/myProject/texturemapping/src/texturemapping.cpp:54: 
undefined reference to 
`vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)'
texturemapping.o(.text+0xb4):/root/myProject/texturemapping/src/texturemapping.cpp:62: 
undefined reference to `vtkVolume16Reader::New()'
texturemapping.o(.text+0xd0):/root/myProject/texturemapping/src/texturemapping.cpp:64: 
undefined reference to 
`vtkVolume16Reader::SetDataByteOrderToLittleEndian()'
texturemapping.o(.text+0x122):/root/myProject/texturemapping/src/texturemapping.cpp:74: 
undefined reference to `vtkContourFilter::New()'
texturemapping.o(.text+0x136): In function `main':
/usr/local/include/vtk/vtkContourFilter.h:166: undefined reference to 
`vtkContourValues::SetValue(int, double)'
texturemapping.o(.text+0x13e): In function `main':
/root/myProject/texturemapping/src/texturemapping.cpp:77: undefined 
reference to `vtkPolyDataNormals::New()'
texturemapping.o(.text+0x166):/root/myProject/texturemapping/src/texturemapping.cpp:80: 
undefined reference to `vtkStripper::New()'
texturemapping.o(.text+0x16e):/root/myProject/texturemapping/src/texturemapping.cpp:82: 
undefined reference to `vtkPolyDataMapper::New()'
texturemapping.o(.text+0x187):/root/myProject/texturemapping/src/texturemapping.cpp:85: 
undefined reference to `vtkActor::New()'
texturemapping.o(.text+0x1a4):/root/myProject/texturemapping/src/texturemapping.cpp:87: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x1d3):/root/myProject/texturemapping/src/texturemapping.cpp:88: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x1f2):/root/myProject/texturemapping/src/texturemapping.cpp:89: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x20e):/root/myProject/texturemapping/src/texturemapping.cpp:90: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x229):/root/myProject/texturemapping/src/texturemapping.cpp:97: 
undefined reference to `vtkContourFilter::New()'
texturemapping.o(.text+0x23d): In function `main':
/usr/local/include/vtk/vtkContourFilter.h:166: undefined reference to 
`vtkContourValues::SetValue(int, double)'
texturemapping.o(.text+0x245): In function `main':
/root/myProject/texturemapping/src/texturemapping.cpp:100: undefined 
reference to `vtkPolyDataNormals::New()'
texturemapping.o(.text+0x25e):/root/myProject/texturemapping/src/texturemapping.cpp:103: 
undefined reference to `vtkStripper::New()'
texturemapping.o(.text+0x266):/root/myProject/texturemapping/src/texturemapping.cpp:105: 
undefined reference to `vtkPolyDataMapper::New()'
texturemapping.o(.text+0x27f):/root/myProject/texturemapping/src/texturemapping.cpp:108: 
undefined reference to `vtkActor::New()'
texturemapping.o(.text+0x29c):/root/myProject/texturemapping/src/texturemapping.cpp:110: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x2c8):/root/myProject/texturemapping/src/texturemapping.cpp:114: 
undefined reference to `vtkOutlineFilter::New()'
texturemapping.o(.text+0x2d0):/root/myProject/texturemapping/src/texturemapping.cpp:116: 
undefined reference to `vtkPolyDataMapper::New()'
texturemapping.o(.text+0x2d8):/root/myProject/texturemapping/src/texturemapping.cpp:118: 
undefined reference to `vtkActor::New()'
texturemapping.o(.text+0x2f5):/root/myProject/texturemapping/src/texturemapping.cpp:120: 
undefined reference to `vtkActor::GetProperty()'
texturemapping.o(.text+0x308):/root/myProject/texturemapping/src/texturemapping.cpp:120: 
undefined reference to `vtkProperty::SetColor(double, double, double)'
texturemapping.o(.text+0x310):/root/myProject/texturemapping/src/texturemapping.cpp:126: 
undefined reference to `vtkCamera::New()'
texturemapping.o(.text+0x324):/root/myProject/texturemapping/src/texturemapping.cpp:127: 
undefined reference to `vtkCamera::SetViewUp(double, double, double)'
texturemapping.o(.text+0x338):/root/myProject/texturemapping/src/texturemapping.cpp:128: 
undefined reference to `vtkCamera::SetPosition(double, double, 
double)'
texturemapping.o(.text+0x347):/root/myProject/texturemapping/src/texturemapping.cpp:129: 
undefined reference to `vtkCamera::SetFocalPoint(double, double, 
double)'
texturemapping.o(.text+0x350):/root/myProject/texturemapping/src/texturemapping.cpp:130: 
undefined reference to `vtkCamera::ComputeViewPlaneNormal()'
texturemapping.o(.text+0x35d): In function `main':
/usr/local/include/vtk/vtkRenderer.h:63: undefined reference to 
`vtkViewport::AddProp(vtkProp*)'
texturemapping.o(.text+0x36a):/usr/local/include/vtk/vtkRenderer.h:63: 
undefined reference to `vtkViewport::AddProp(vtkProp*)'
texturemapping.o(.text+0x377):/usr/local/include/vtk/vtkRenderer.h:63: 
undefined reference to `vtkViewport::AddProp(vtkProp*)'
texturemapping.o(.text+0x382): In function `main':
/root/myProject/texturemapping/src/texturemapping.cpp:138: undefined 
reference to `vtkRenderer::SetActiveCamera(vtkCamera*)'
texturemapping.o(.text+0x38b):/root/myProject/texturemapping/src/texturemapping.cpp:139: 
undefined reference to `vtkRenderer::ResetCamera()'
texturemapping.o(.text+0x39b):/root/myProject/texturemapping/src/texturemapping.cpp:140: 
undefined reference to `vtkCamera::Dolly(double)'
texturemapping.o(.text+0x3db):/root/myProject/texturemapping/src/texturemapping.cpp:153: 
undefined r
eference to `vtkRenderer::ResetCameraClippingRange()'
collect2: ld returned 1 exit status
gmake[2]: *** [texturemapping] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***

Does any one know why this problem is occuring.
Thanks in advance

--Ankur




More information about the vtkusers mailing list