[vtkusers] Mac OS X 10.5.6: Compiling VTK 5.2.1 with X11 and Tcl

Michael Rullmann rullmann at ftz.htwk-leipzig.de
Wed Jan 28 11:45:47 EST 2009


Hey list,


I try to compile VTK  with X11 and Tcl support to be able to use KWWidgets and the vtkInria3D Add-Ons.
But I get stuck at 96%:

Scanning dependencies of target vtk
[ 96%] Building CXX object Wrapping/Tcl/CMakeFiles/vtk.dir/vtkTkAppInit.o
Linking CXX executable ../../bin/vtk
Undefined symbols:
  "_glXGetCurrentContext", referenced from:
      vtkXOpenGLRenderWindow::MakeCurrent()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::MakeCurrent()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::MakeCurrent()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXMakeCurrent", referenced from:
      vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::MakeCurrent()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::MakeCurrent()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXChooseVisual", referenced from:
      vtkXOpenGLRenderWindowTryForVisual(_XDisplay*, int, int, int, int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXDestroyContext", referenced from:
      vtkXOpenGLRenderWindow::DestroyWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::DestroyOffScreenWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::DestroyOffScreenWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXQueryExtensionsString", referenced from:
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXIsDirect", referenced from:
      vtkXOpenGLRenderWindow::IsDirect()      in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::IsDirect()      in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::IsDirect()      in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXCreateGLXPixmap", referenced from:
      vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXQueryServerString", referenced from:
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXCreateContext", referenced from:
      vtkXOpenGLRenderWindow::CreateAWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXQueryVersion", referenced from:
      vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXQueryExtension", referenced from:
      vtkOpenGLExtensionManager::ReadOpenGLExtensions()       in libvtkRendering.a(vtkOpenGLExtensionManager.o)
      vtkXOpenGLRenderWindow::CreateAWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXGetClientString", referenced from:
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
      vtkXOpenGLRenderWindow::ReportCapabilities()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXGetConfig", referenced from:
      vtkXOpenGLRenderWindow::SupportsOpenGL()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXDestroyGLXPixmap", referenced from:
      vtkXOpenGLRenderWindow::DestroyOffScreenWindow()       in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
  "_glXSwapBuffers", referenced from:
      vtkXOpenGLRenderWindow::Frame()      in libvtkRendering.a(vtkXOpenGLRenderWindow.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [bin/vtk] Error 1
make[1]: *** [Wrapping/Tcl/CMakeFiles/vtk.dir/all] Error 2
make: *** [all] Error 2


It seems to be a problem with OpenGL, which is set as following in cmake:

OPENGL_INCLUDE_DIR               /usr/X11R6/include
OPENGL_gl_LIBRARY                /System/Library/Frameworks/OpenGL.framework
OPENGL_glu_LIBRARY               /System/Library/Frameworks/AGL.framework
OPENGL_xmesa_INCLUDE_DIR         /usr/X11R6/include


Any suggestions how to solve this issue?


Best, Michael

-- 


More information about the vtkusers mailing list