[vtkusers] OpenGL errors on Cygwin

David Doria daviddoria+vtk at gmail.com
Wed Sep 8 21:44:57 EDT 2010


I am getting these linker errors when compiling the latest git version
in Cygwin (in Windows 7).

../../../bin/libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o):vtkXOpenGLRenderWindow.cxx:(.text+0x41f5):
undefined reference to `_glXDestroyContext'
(many more _glXSOMETHING errors)

I have ALL of the cygwin packages installed, so I don't think it is a
missing package problem.

Here is the relevant make output with VERBOSE=1:

/usr/bin/c++.exe     -Wno-deprecated -mwin32
CMakeFiles/GraphicsCxxTests.dir/GraphicsCxxTests.cxx.o
(more .o files...)
CMakeFiles/GraphicsCxxTests.dir/TestDecimatePolylineFilter.cxx.o  -o
../../../bin/GraphicsCxxTests.exe
-Wl,--out-implib,../../../bin/libGraphicsCxxTests.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
../../../bin/libvtkRendering.a ../../../bin/libvtkIO.a
../../../bin/libvtkDICOMParser.a ../../../bin/libvtkNetCDF_cxx.a
../../../bin/libvtkNetCDF.a ../../../bin/libvtkmetaio.a -lcomctl32
../../../bin/libvtksqlite.a ../../../bin/libvtkpng.a
../../../bin/libvtktiff.a ../../../bin/libvtkzlib.a
../../../bin/libvtkjpeg.a ../../../bin/libvtkexpat.a -lvfw32
../../../bin/libvtkGraphics.a ../../../bin/libvtkverdict.a
../../../bin/libvtkImaging.a ../../../bin/libvtkFiltering.a
../../../bin/libvtkCommon.a ../../../bin/libvtksys.a -lws2_32 -lm
-lpthread -lwsock32 -lgdi32 ../../../bin/libvtkftgl.a
../../../bin/libvtkfreetype.a /usr/lib/w32api/libopengl32.a -lXt -lSM
-lICE -lX11 -lXext

I've been talking with the Cygwin people for the last couple of days.
Here are the highlights:

1) "These symbols are provided by libGL, but you'll notice that
libvtkftgl.a comes after that on the command line you are using."

2) "you should not be linking with /usr/lib/w32api/libopengl32.a"

3) "comctl32, vfw32, gdi32, wsock32, ws2_32 also seem unlikely to be right."

Anyone have any thoughts on this?

David



More information about the vtkusers mailing list