delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/04/10:44:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <bleau AT igb DOT umontreal DOT ca>
Subject: Re: A problem with glut in cygwin
Mime-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h54EisR08397

Amikam Liss <amikaml at netvision dot net dot il> 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 
<GL/glut.h>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019