X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_LG,TW_LV X-Spam-Check-By: sourceware.org Message-ID: <4C8796B6.70707@dronecode.org.uk> Date: Wed, 08 Sep 2010 14:59:18 +0100 From: Jon TURNEY Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: daviddoria AT gmail DOT com Subject: Re: OpenGL linking problems References: <4C863765 DOT 40104 AT dronecode DOT org DOT uk> <4C8783A0 DOT 8030009 AT dronecode DOT org DOT uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 08/09/2010 13:53, David Doria wrote: >> Oh, I guess you have a makefile generated by cmake? In which case you need >> make VERBOSE=1 to get it to show you what it is doing. >> > > Ok, now there is some useful output. I see an -lGL, what else should I > be looking for? > > /usr/bin/c++.exe -Wno-deprecated -mwin32 [list of .o files snipped] > 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 -lGL -lGLU > ../../../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 Oh my! That's very confused about if it's building a w32api or an X11 application. At the very least, you should not be linking with /usr/lib/w32api/libopengl32.a. comctl32, vfw32, gdi32, wsock32, ws2_32 also seem unlikely to be right. > ../../../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' > collect2: ld returned 1 exit status These symbols are provided by libGL, but you'll notice that libvtftgl.a comes after that on the command line you are using. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple