Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-Id: <5.2.0.9.0.20031031170145.03312ca0@irispavp.igb.umontreal.ca> X-Sender: bleau3 AT irispavp DOT igb DOT umontreal DOT ca (Unverified) Date: Fri, 31 Oct 2003 17:23:13 -0500 To: cygwin AT cygwin DOT com From: Andre Bleau Subject: Re: OpenGL and Cygwin Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed X-MDRemoteIP: 10.52.50.2 X-Return-Path: bleau AT igb DOT umontreal DOT ca X-MDaemon-Deliver-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h9VMOWsq017312 suresh at research dot att dot com wrote: >Hi Brian, Andre, cygwin folks, > Thanks for all your help to date. I have been somewhat lax in replying >since I am sitting at my laptop in India with a slow connection. Here is >the situation: > >As per Andre's suggestion, I wanted to force linking via the windows gl >headers, and so I just moved the /usr/include/GL/* headers out of the >way, and am using the headers from /usr/include/w32api/GL > >My g++ command line is > >g++ -mno-cygwin .... -lglut32 -lglu32 -lopengl32 > >and a cygcheck on my exe file indicated that the glut file being linked >is my local copy that I got from nvidia, Can you tell us why you are using GLUT from NVDIA instead of GLUT from Cygwin's OpenGL package? >and the glu,opengl32 libs are >the dll files linked from c/windows/system32 > >As I mentioned, all of opengl1.1 works fine. In an attempt to get >histograms, I enabled GL_VERSION_1.2 (I may have the spelling wrong here, >but I used the correct #define). However, the way the windows gl files >are structured, if the _WIN32 option is defined, the GL_VERSION_1_2 >option is ignored (i.e the GL_VERSION stuff is only included inside a >#ifndef _WIN32 bracket). > >Instead, I enabled GL_GLEXT_PROTOTYPES and that seemed to let the >compilation go thru ok. However, at the link phase, I got stuck, with an >error message of the form > >undefined reference to _glGetMinmax AT 2 > >the @2 suggesting that at least I am using the right include files. OpenGL 1.2 and up functions have to be loaded dynamically on the Windows platform, whether you are using Cygwin or not. Your code cannot simply call glGetMinmax; your code needs to load that function first. No fancy linking option or library or dll, from NVDIA or someone else, can avoid that. This is a common problem for OpenGL programmers on the Windows platform, and it is not related to Cygwin. I suggest that you look in some OpenGL forum to learn how to do that, such as: http://www.opengl.org/discussion_boards/cgi_directory/forumdisplay.cgi?action=topics&number=2&start=here If dynamic loading sounds to much trouble, I suggest that you look at extgl, a library that makes programming OpenGL 1.2+ applications on the Windows platform easier: http://www.levp.de/3d/ >Now, i have been poking around with the nvidia opengl libs: the one I >have doesn't appear to be the right kind though: (nvoglnt.dll) - I >couldn't link it using -lnvoglnt (ld crashed) You cannot link with that dll. >This is my current state. I am trying to download the new nvidia drivers >that were released Oct 23, but it is taking some time given my slow >connection.... > André Bleau, Cygwin's OpenGL package maintainer. Please address all questions and problem reports about Cygwin's OpenGL package to cygwin AT cygwin DOT com . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/