i’m new to graphics programming and i’ve got a background in C programming. I downloaded a couple of C files implementing things like teapot, sphere, rotating cube etc but i simply can’t compile them. I used project in Borland C++ and Vis C++ but things are not working. Am i missing something??? The compiler keeps giving me messages about erros in the gh.h header file. PLease help me out!!!
Try including windows.h before gl.h and make sure you link to the proper libraries.
which libraries?? Do you mean I’ve got to add the glut32.dll file to the project???
You should add the following in sequence to the top of your program (in sequence):
#include <gl/glu.h> // Optional GL Utility Library
#include <gl/glaux.h> // Optional GL Aux Toolkit
#include <gl/glut.h> // Optional GLUT Toolkit
And add to your project as needed :
OpenGL32.lib, glu32.lib, glaux.lib, glut32.lib