I CANT GET ANYTHING THAT USES GLUT.H to COMPILE

I NEED HELP. I AM USING VISUAL C++ AND HAVE JUST RECENTLY DOWNLOADED THE HEADER FILES FO OPENGL. IF SOMEONE COULD PLEASE OFFER ME A SIMPLE, STRAIGHT FORWARD INSTALATION PROCEDURE TO FOLLOW I WOULD BE MOST THANKFUL.
I CAN’T GET ANYTHING TO BUILD. IT COMPILES, THEN TRIES TO LINK AND I GET INSANE ERRORS LIKE SYNTAX ERRORS IN THE GLUT.H WHICH I KNOW IS IMPOSSIBLE. PLEASE HELP…

your shift-key is broken, come again and ask when you repaired it.

-Lev

did you linked with the right .LIB files?

include windows.h before glut.h

include windows.h before glut.h

wrong, glut.h includes windows.h if needed, its kinda “smart”

Make sure to build it as a Win32 CONSOLE app, not a regular windows application.

j

I think that you are wrong…

quoted from glut.h

  • GLUT 3.7 now tries to avoid including <windows.h>

if 0

/* This would put tons of macros and crap in our clean name space. */

define WIN32_LEAN_AND_MEAN

include <windows.h>

else

glut.h defines all needed stuff that would be otherwise defined in windows.h.

you need to include windows.h before gl.h&glu.h, but not before glut.h
-Lev

the whole setup is described at http://www.lighthouse3d.com/opengl/glut/