[vtkusers] Problems linking with OpenGL on SUN ultra 2

Donald Tournier dtournie at ich.ucl.ac.uk
Thu Jul 13 09:18:00 EDT 2000


I am having trouble compiling the example program for creating a sphere
which I got from the kitware homepage. This is my first attempt at using
vtk. The object file is created, but then I get unreferenced symbol
problems for the OpenGL subroutines. Below is the output of the command
'make' and the output of 'nm' on the libVTKGraphics file.

Does anyone know how to overcome this?
Thanks,

donald.


output of 'make':
-------------------------------------------------------------------------
/usr/local/bin/g++ -o sphere -g -O2 -DVTK_WORDS_BIGENDIAN  -DVTK_USE_PTHREADS   -D_HP_NO_FAST_MACROS -DHAVE_LIMITS_H -DHAVE_UNISTD_H -I -I. -I/../graphics -DVTK_USE_GRAPHICS -I/../imaging -DVTK_USE_IMAGING -I/../patented -DVTK_USE_PATENTED -I/../contrib -
DVTK_USE_CONTRIB -DVTK_USE_OGLR -I/usr/openwin/include/GL -I/soft/vtk/include sphere.o \
 /soft/vtk/imaging/libVTKImaging.a /soft/vtk/graphics/libVTKGraphics.a /soft/vtk/common/libVTKCommon.a /soft/vtk/contrib/libVTKContrib.a /soft/vtk/patented/libVTKPatented.a -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/openwin/lib -ldl -lpthread -lthread -
L/usr/openwin/lib -R/usr/openwin/lib -lXext -lXt \
-lSM -lICE -lX11 -lsocket  -lnsl -lm \
-lGL -lGLU -lGLw
Undefined			first referenced
 symbol  			    in file
vtkOpenGLRenderWindow::New(void)    /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLVolumeTextureMapper2D::New(void)/soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLPolyDataMapper::New(void)  /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLCamera::New(void)          /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLLight::New(void)           /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLTexture::New(void)         /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLActor::New(void)           /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLProperty::New(void)        /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLRenderer::New(void)        /soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
vtkOpenGLProjectedPolyDataRayBounder::New(void)/soft/vtk/graphics/libVTKGraphics.a(vtkGraphicsFactory.o)
ld: fatal: Symbol referencing errors. No output written to sphere
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sphere'
-------------------------------------------------------------------------


output of 'nm -A /soft/vtk/graphics/libVTKGraphics.a | grep OpenGL':
-------------------------------------------------------------------------
[61]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__14vtkOpenGLActor
[38]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__14vtkOpenGLLight
[75]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__15vtkOpenGLCamera
[88]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__16vtkOpenGLTexture
[60]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__17vtkOpenGLProperty
[98]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__17vtkOpenGLRenderer
[39]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__21vtkOpenGLRenderWindow
[63]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__23vtkOpenGLPolyDataMapper
[76]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__30vtkOpenGLVolumeTextureMapper2D
[28]	|         0|       0|NOTY |GLOB |0    |UNDEF  |New__36vtkOpenGLProjectedPolyDataRayBounder
--------------------------------------------------------------------------


_____________________________________________
Jacques-Donald Tournier
Physics & Radiology Unit
Institute of Child Health
30 Guildford Street
London WC1N 1EH

email: D.Tournier at ich.ucl.ac.uk
tel: +44 (0)20 7405 9200 ext 0338





More information about the vtkusers mailing list