This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A problem with glut in cygwin

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[])
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!");
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 .

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]