[vtkusers] Problems linking with OpenGL on SUN ultra 2
Lisa Sobierajski Avila
lisa.avila at kitware.com
Thu Jul 13 13:33:43 EDT 2000
Hi Donald,
VTK can be build on top of different graphics libraries- now there is only
OpenGL and Mesa, but in the past there was XGL, gl, and Starbase as well.
The menas that vtkOpenGL*.cxx is not built by default - only if OpenGL is
found. I still think there is a configuration problem - did you run
configure before you installed OpenGL? Maybe you need to remove your
config.cache and reconfigure? You should not have to add flags by hand -
you are not likely to produce the correct results that way.
Lisa
At 12:19 PM 7/13/00, Donald Tournier wrote:
>Hi!
>
>I am pretty sure OpenGL has installed correctly - I got the OpenGl 1.2.1
>package from the SUN website a few days ago and ran their
>'ogl_install_check' program, everything was fine. I did have problems with
>configure, since it didn't recognise the OpenGL includes. I finally
>managed to compile VTK by editing the system.make file to add
>'-DVTK_USE_OGLR -L/usr/openwin/include/GL' to the GRAPHICS_API_FLAGS line.
>I was assuming that if the VTK build was successful, then that meant that
>the libraries were recognised as OK.
>
>Another thing which is puzzling me: all the unrecognised symbols are
>actual vtk routines - they are all named as vtkOpenGLsomething. Doesn't
>that mean that the problem is not with the OpenGL libraries?
>
>Thanks again for your time,
>
>donald
>
>On Thu, 13 Jul 2000, Lisa Sobierajski Avila wrote:
>
> > Hello Donald,
> >
> > Is OpenGL installed on your machine? If you don't have object files for
> the
> > OpenGL classes, then I suspect your configure did not find OpenGL and that
> > is the reason for your errors.
> >
> > Lisa
> >
> >
> > At 09:18 AM 7/13/00, Donald Tournier wrote:
> >
> > >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/libVTKGraph
> ics.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/libVT
> KGraphics.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
> > >
> > >
> > >_______________________________________________
> > >This is the private VTK discussion list.
> > >Please keep messages on-topic. Check the FAQ at:
> > ><http://public.kitware.com/cgi-bin/vtkfaq>
> > >vtkusers mailing list
> > >vtkusers at public.kitware.com
> > >http://public.kitware.com/mailman/listinfo/vtkusers
> >
> >
> >
More information about the vtkusers
mailing list