[vtkusers] GraphicsCxxTests linking error with Cygwin

David Doria daviddoria+vtk at gmail.com
Sun Sep 5 07:18:48 EDT 2010


When building VTK with ENABLE_TESTING ON, I get a bunch of linker errors:

Linking CXX executable ../../../bin/GraphicsCxxTests.exe
../../../bin/libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o):vtkXOpenGLRenderWindow.cxx:(.text+0x179c):
undefined reference to `_glXIsDirect'
../../../bin/libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o):vtkXOpenGLRenderWindow.cxx:(.text+0x17fc):
undefined reference to `_glXIsDirect'
../../../bin/libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o):vtkXOpenGLRenderWindow.cxx:(.text+0x185a):
undefined reference to `_glXIsDirect'
../../../bin/libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o):vtkXOpenGLRenderWindow.cxx:(.text+0x1901):
undefined reference to `_glXGetConfig'

......[about a thousand more....]....

If I change this line:
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO)
in Graphics/Testing/Cxx/CMakeLists.txt to
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO GL GLU)

almost all of the errors go away except these:

Linking CXX executable ../../../bin/GraphicsCxxTests.exe
../../../bin/libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o):FTGLPixmapFontRenderOpenGL.cpp:(.text+0xe):
undefined reference to `_glPushClientAttrib'
../../../bin/libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o):FTGLPixmapFontRenderOpenGL.cpp:(.text+0x7d):
undefined reference to `_glPopClientAttrib'
../../../bin/libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o):FTGLPixmapFontRenderOpenGL.cpp:(.text+0x92):
undefined reference to `_glPushClientAttrib'
../../../bin/libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o):FTGLPixmapFontRenderOpenGL.cpp:(.text+0x101):
undefined reference to `_glPopClientAttrib'

I have all of the cygwin packages installed. Any thoughts?

Thanks,

David



More information about the vtkusers mailing list