[vtkusers] STLreadtest.o(.text+0x7): undefined reference to `vtkSTLReader::New(void)'

Paul McGuinness mcguinpg at maths.tcd.ie
Mon Jun 23 08:28:48 EDT 2003


Mathieu,

All done and done and my compilation line is now:

$ make
echo "Building dependencies. cmake.depends..."
Building dependencies. cmake.depends...
/usr/local/bin/cmake -S/home/cs/pmcguinn/visual/Lab1
-O/home/cs/pmcguinn/visual/Lab1 -H/home/cs/pmcguinn/visual/Lab1
-B/home/cs/pmcguinn/visual/Lab1
-- Compiling VTK loaded commands
-- Compiling VTK loaded commands - done
make  cmake.depends
make[1]: Entering directory `/home/cs/pmcguinn/visual/Lab1'
make[1]: `cmake.depends' is up to date.
make[1]: Leaving directory `/home/cs/pmcguinn/visual/Lab1'
make  cmake.check_depends
make[1]: Entering directory `/home/cs/pmcguinn/visual/Lab1'
make[1]: `cmake.check_depends' is up to date.
make[1]: Leaving directory `/home/cs/pmcguinn/visual/Lab1'
make  -f cmake.check_depends
make[1]: Entering directory `/home/cs/pmcguinn/visual/Lab1'
make[1]: Leaving directory `/home/cs/pmcguinn/visual/Lab1'
make  all
make[1]: Entering directory `/home/cs/pmcguinn/visual/Lab1'
echo "Building object file stlreadtest.o..."
Building object file stlreadtest.o...
c++ -o stlreadtest.o      -I/usr/X11R6/include
-I/home/cs/pmcguinn/visual/Lab1 -I/usr/local/include/vtk    -c
/home/cs/pmcguinn/visual/Lab1/stlreadtest.cxx
echo "Building executable stlreadtest..."
Building executable stlreadtest...
c++         -I/usr/X11R6/include -fPIC  stlreadtest.o    -o stlreadtest
-rdynamic -L/usr/local/lib/vtk -L/usr/X11R6/lib -lvtkRendering
-lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkCommon -lpthread -ldl -lm
-lSM -lICE -lSM -lICE -lX11 -lXext -lX11 -lXext -lvtkftgl -lGLU -lGL
-lvtkfreetype -lXt -lSM -lICE -lX11 -lXext
-Wl,-rpath,/usr/local/lib/vtk:/usr/X11R6/lib
stlreadtest.o: In function `main':
stlreadtest.o(.text+0x7): undefined reference to `vtkSTLReader::New(void)'
collect2: ld returned 1 exit status
make[1]: *** [stlreadtest] Error 1
make[1]: Leaving directory `/home/cs/pmcguinn/visual/Lab1'
make: *** [default_target] Error 2

I have just noticed that this problem is not just localised to
vtkSTLReader, but to all vtk*Reader!

Paul.



On Fri, 20 Jun 2003, Mathieu Malaterre wrote:

> Paul,
> 	Could you please turn CMAKE_VERBOSE_MAKEFILE to ON (either through the
> cmake interface or by modifying CMakeCache.txt :
>
> CMAKE_VERBOSE_MAKEFILE:BOOL=ON
>
> Then rerun cmake && make and please send us the g++ compilation line
>
> Thanks,
> mathieu
>
> Paul McGuinness wrote:
> > Hi VTK Developers
> >
> > I am in a bit of a pickel, I am on Linux using the cmake, then make to
> > compile my simple program containing the following code:
> >
> > #include "vtkSTLReader.h"
> >
> > int main( int argc, char *argv[] )
> > {
> >      vtkSTLReader *sr = vtkSTLReader::New();
> >       sr->SetFileName("y40501.stl");
> >
> >       sr->Delete();
> >   return 0;
> > }
> >
> > And on compilation I get the following error, does anyone know what is
> > wrong? I am using VTK-4.2.2
> >
> >
> > $ make
> > Building dependencies cmake.check_depends...
> > -- Compiling VTK loaded commands
> > -- Compiling VTK loaded commands - done
> > Building object file STLreadtest.o...
> > Building executable STLreadtest...
> > STLreadtest.o: In function `main':
> > STLreadtest.o(.text+0x7): undefined reference to `vtkSTLReader::New(void)'
> > collect2: ld returned 1 exit status
> > make[1]: *** [STLreadtest] Error 1
> > make: *** [default_target] Error 2
> >
> > Does anyone know how I can fix this?
> >
> > Many thanks,
> > Paul.
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
> --
> Mathieu Malaterre
> CREATIS
> 28 Avenue du Doyen LEPINE
> B.P. Lyon-Montchat
> 69394 Lyon Cedex 03
> http://www.creatis.insa-lyon.fr/~malaterre/
>
>




More information about the vtkusers mailing list