   Visual Studios 2005 + GLUT Help
  Hello GameDev.net,I've done some very basic graphics programming with Allegro and want to move up to the big leagues of 3D. I'm using Visual Studios 2005 and I'm having a problem compiling the following program:/*My First GLUT ProgramRemember to include glut.dll with the package so it runs properlyelsewhere*///needed to use OpenGL and GLUT#include <GL/glut.h>//needed by Visual Studio#include <stdafx.h>//draws the scenevoid renderScene(void) {//clears the bufferglClear(GL_COLOR_BUFFER_BIT);//creating a triangleglBegin(GL_TRIANGLES);//vertex locationsglVertex3f(-0.5,-0.5,0.0);glVertex3f(0.5,0.0,0.0);glVertex3f(0.0,0.5,0.0);glEnd();//end triangle and flush bufferglFlush();}//starting pointvoid main(int argc, char **argv) {//initialize glutglutInit(&argc, argv);//display single buffer in RGBA formatglutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);//try and create window at 100,100 from upperleftglutInitWindowPosition(100,100);//try and create window of 320 by 320 pixlesglutInitWindowSize(320,320);//name windowglutCreateWindow("3D Tech- GLUT Tutorial");//display scene in windowglutDisplayFunc(renderScene);//enter glut's main loopglutMainLoop();}I have already downloaded glut.lib, glut.h, glut.dll and have placed it into the  proper subfolders in PlatformSDK under VC in my Visual Studios folder. I've also added the proper dependencies in the properties window for opengl32.dll glut.dll and another dll. However, these are the error messages I'm receiving:------ Build started: Project: OpenGLTest, Configuration: Release Win32 ------Compiling...OpenGLTest.cpp.\OpenGLTest.cpp(15) : error C2065: 'GL_COLOR_BUFFER_BIT' : undeclared identifier.\OpenGLTest.cpp(15) : error C3861: 'glClear': identifier not found.\OpenGLTest.cpp(18) : error C2065: 'GL_TRIANGLES' : undeclared identifier.\OpenGLTest.cpp(18) : error C3861: 'glBegin': identifier not found.\OpenGLTest.cpp(20) : error C3861: 'glVertex3f': identifier not found.\OpenGLTest.cpp(21) : error C3861: 'glVertex3f': identifier not found.\OpenGLTest.cpp(22) : error C3861: 'glVertex3f': identifier not found.\OpenGLTest.cpp(23) : error C3861: 'glEnd': identifier not found.\OpenGLTest.cpp(25) : error C3861: 'glFlush': identifier not found.\OpenGLTest.cpp(31) : error C3861: 'glutInit': identifier not found.\OpenGLTest.cpp(33) : error C2065: 'GLUT_DEPTH' : undeclared identifier.\OpenGLTest.cpp(33) : error C2065: 'GLUT_SINGLE' : undeclared identifier.\OpenGLTest.cpp(33) : error C2065: 'GLUT_RGBA' : undeclared identifier.\OpenGLTest.cpp(33) : error C3861: 'glutInitDisplayMode': identifier not found.\OpenGLTest.cpp(35) : error C3861: 'glutInitWindowPosition': identifier not found.\OpenGLTest.cpp(37) : error C3861: 'glutInitWindowSize': identifier not found.\OpenGLTest.cpp(39) : error C3861: 'glutCreateWindow': identifier not found.\OpenGLTest.cpp(41) : error C3861: 'glutDisplayFunc': identifier not found.\OpenGLTest.cpp(43) : error C3861: 'glutMainLoop': identifier not foundBuild log was saved at "file://c:\Visual Studios Projects\OpenGLTest\OpenGLTest\Release\BuildLog.htm"OpenGLTest - 19 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========It's obviously not recognizing GLUT or I'm doing something fundamentally wrong. Can someone please help me? Thanks.   
  I've never used precompiled headers, but that may be causing you problems.Maybe include stdafx.h before everything else.   ;  Well, that worked. I'm not sure why GLUT had to be last, but thanks for your help :)   