I need some help !

My os is Win2k professional with the latest
service packs!And Visual Studio as the compiler.

I wrote a programme with GLUT like this:

/////////////////////////////////////

#include<GL\glut.h>

void display()
{
}

int main(int argc, char **argv)
{
glutInit(&argc,argv);

glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA);

glutInitWindowSize( 400,600);

glutCreateWindow(argv[0]);

glutDisplayFunc(display);

glutMainLoop();

return 0;

}
//////////////////////////////////////

It was successfully compiled,no errors,no
warnings! But when runing the exe programme,
I found it was not responding.
I found some information in Debug Mode like
this:
///////////////////////////////////////////
Loaded ‘D:\WINNT\system32
tdll.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\glut32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\OPENGL32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\msvcrt.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\KERNEL32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\ADVAPI32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\rpcrt4.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\GDI32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\USER32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\glu32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\ddraw.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\dciman32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\winmm.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\imm32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\lpk.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\usp10.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32
vdesk32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\mmdrv.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\MSCTF.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32
voglnt.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\mcd32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\version.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\lz32.dll’, no matching symbolic information found.
Loaded ‘D:\WINNT\MUI\fallback\0804\msctf.dll.mui’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\OLEAUT32.DLL’, no matching symbolic information found.
Loaded ‘D:\WINNT\system32\OLE32.DLL’, no matching symbolic information found.
The thread 0x508 has exited with code 0 (0x0).
The program ‘D:\Documents and Settings\chenhang\My Documents\work\Debug
ew.exe’ has exited with code 0 (0x0).
////////////////////////////////////////////

I don’t know why,I was just following the book!
Help!

You’ve registered the display callback but have you actually implemented it? Something like

void display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();

glRectf(-0.5, -0.5, 0.5, 0.5);

glFlush();
}

See if this draws a rectangle in your window. Also later you could change GL_SINGLE to GL_DOUBLE and instead of glFlush(); use glutSwapBuffers(); (it includes glFlush()

Thank you very much!

After I inserted glutSwapBuffers() before glFlush(), it worked!

Thank you again!