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.20030604103705.028cf008@irispavp.igb.umontreal.ca> X-Sender: bleau2 AT irispavp DOT igb DOT umontreal DOT ca (Unverified) Date: Wed, 04 Jun 2003 10:44:51 -0400 To: cygwin AT cygwin DOT com From: Andre Bleau Subject: Re: A problem with glut in cygwin Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h54EisR08397 Amikam Liss wrote: >Hi, I have a problem with glut, I will be happy if someone can help me: >I have Windows98, I installed cygwin yesterday. >I wrote a small progam in OpenGL using glut. >I compiled the program with this command: (the program - triangle.c) >gcc triangle.c -o triangle -lOpenGL32 -lGLU32 -lglut32 (I linked with the >libraries of windows) The correct order is (as written in /usr/doc/opengl-1.1.0/README.txt): -lglut32 -lglu32 -lopengl32 >Now when I run the executable triangle.exe, the program is running ok (a >rotated trinagle), but when I close the >window, the programm hangs, the file triangle.exe doesn't finish to run. >This is the call stack: >... >Cannot access memory at address 0x83941fec > >The main function: > >int main(int argc,char *argv[]) >{ >glutInit(&argc,argv); >glInit(); >glutMainLoop(); >return 0; >} > Your main is wrong. A minimalist GLUT program is: -----------------------------------------------------------------------------#include void display_func() { /* Do some drawing here */ } int main(int argc, char* argv[]) { glutInit(&argc, argv); glutCreateWindow("Hello GLUT!"); glutDisplayFunc(display_func); glutMainLoop(); return 0; } ----------------------------------------------------------------------------- >What I can do to solve the problem? >Thank you >Amikam Liss André Bleau, Cygwin's OpenGL package maintainer. email: bleau at igb dot umontreal dot ca (Fight SPAM: encode your email-address) 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/