1. Copy files in dll folder to C:\windows\system32 (& SysWow64 if available)
2. Copy files in lib folder to C:\program files(x86 on some machines)\Microsoft VS 11.0\VC\lib 3. Copy GL folder to C:\program files(x86 on some machines)\Microsoft VS\VC\include #include <GL/glut.h>
void display( void )
{ glClear(GL_COLOR_BUFFER_BIT); /* clear the window */ glutWireCube(1.0); glFlush(); /* send all commands */ }
void main(int argc, char** argv)
{ glutInit(&argc,argv); glutInitWindowSize( 500, 500 ); /* A x A pixel screen window */ glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE); glutCreateWindow("My Rectangle"); /* window title */ glutDisplayFunc(display); /* tell OpenGL main loop what */ //myinit(); /* set attributes */ glutMainLoop(); /* pass control to the main loop */ } • Open Visual Studio • File -> New Project - > Choose Visual C++ -> Choose empty project -> Write Project name and Press OK • Right click on Project in “Solution Explorer” -> Click Add -> Click New Item -> Click C++ File -> Press Add • Paste the code onto the form and run.