[...] building Windows, buttons, menus etc.
GLUT does not build any buttons or menus (you can create popup menus, but not a "menu" in the normal sense).
If you want something very similar to GLUT (maybe because you already spent time learning it), you are off best with freeglut (
http://freeglut.sourceforge.net).
If you want a really good lightweight OpenGL toolkit, but you don't need popup menus and rather useless geometric modelling functions (like glutWireCube), then GLFW (
http://glfw.sourceforge.net) is certainly the best choice.
If you absolutely must have menus
and buttons
and OpenGL, you will need to use either FLTK (
http://www.fltk.org) or wxWidgets (
http://www.wxwidgets.org).
wxWidgets has a very nice looking web page and a lot of shining features, but it is an ugly clumsy beast, painful to build and really huge. Also note that wxWidgets breaks STL by redefining
new in a macro. If you have the habit to use STL, you must
#undef new first (see wxWidgets FAQ).
FLTK looks like crap when you visit their website, but it really does a good job. It is small, lightweight, and easy to program with. There is a RAD editor coming with it, too. The 1.1x branch is 'stable', and 2.0 is 'alpha'. Building is nearly as painful as building wxWidgets, but there are binary DevPaks
If you want to create windows, buttons, and menus
inside your OpenGL context, you might want to look at GLUI (
http://www.nigels.com/glt/glui) or at Crazy Eddie's GUI. The latter was still quite awful when I last looked at it a year or so ago, but it now ships with OGRE, so I guess that it has been drastically improved.
EDIT:
The code above looks like it should work. There is only one mistake in it, but that cannot possibly cause a crash. You forgot to set a vertex colour, so it would probably render all black. Are you maybe using some weird optimisation options (regparam comes to my mind), and have you made sure you use pristine versions of the GLUT library files? Maybe you experience
DLL hell?