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.20031020102351.00b19e28@irispavp.igb.umontreal.ca> X-Sender: bleau3 AT irispavp DOT igb DOT umontreal DOT ca (Unverified) Date: Mon, 20 Oct 2003 10:35:30 -0400 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 h9KEaMGD032146 Suresh Venkatasubramanian wrote: >Hi, > I apologize in advance if this duplicates questions already asked and >answered: I have searched the cygwin/cygwin-apps mailing lists already, >and there appears to be no clear answer, and most of the FAQs are a bit >outdated. > >I have an opengl program that I wish to compile under the cygwin >environment, but using NO mesa drivers, only the native windows drivers. >This program uses GLU and GLUT, as well as opengl and nvidia extensions. > >Now I have downloaded the nvidia extensions headers, and am able to create >object files correctly, after some experimenting (it appears that I need >to use the -mno-cygwin flag to enable the _WIN32 macros). Do "the nvidia extensions headers" you downloaded include gl.h ? If yes, that could be your problem. >However, I have severe problems when linking using g++ *.o -lglu32 >-lglut32 -lopengl32 (as per the /usr/doc/opengl*/README file). /usr/doc/opengl*/README says: Add -lglut32 -lglu32 -lopengl32 to your link command (in that order). > Most of the >stubs cannot be found. A sampling of the errors I get: > > >....undefined reference to `_glTexParameterf AT 12` >....undefined reference to`_glPixelStorei AT 8` > >A sign that I am probably missing some more basic libs is that I even get >undefined references to __assert, as well as something mysterious called >__imp__iob, which again looks like somethng unrelated to the opengl code I >am compiling. > >I'd appreciate any help.... Try something simple, like compiling and linking the following example with g++ -o helloGlut helloGlut.c -lglut32 -lglu32 -lopengl32 and report _all_ and _exact_ error messages to this list (not to me!). ---------------------- helloGlut.c ---------------------------- #include void display_func() { glClear(GL_COLOR_BUFFER_BIT); } int main(int argc, char* argv[]) { glutInit(&argc, argv); glutCreateWindow("Hello GLUT!"); glutDisplayFunc(display_func); glutMainLoop(); return 0; } ---------------------- helloGlut.c ---------------------------- 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/