Works for me, which doesn't help you much. You don't have to forward declare your 'main' function, BTW, but that isn't the problem.

I tested your code with under winxp sp2 using glut 3.7.3. If your not using that version of glut then try it and see if that helps.

Also check the task manager to see if the program is exiting properly or it's just an issue with dev-cpp.