View Full Version : link error

03-25-2003, 01:54 PM
I'm getting a link error (unresolved glClearColor) with the following code. I'm using the glut32.lib. Where are the gl* functions?

#include <windows.h>
#include <gl/glut.h>

int main(int argc, char **argv)
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(400, 100);
glutInitWindowPosition(100, 100);
glutCreateWindow("First Chapter - Opening an OpenGL Window");

glClearColor(1.0, 1.0, 1.0, 0.0) ;

03-25-2003, 02:32 PM
O.K. I wasn't including opengl32.lib

Problem solved

03-25-2003, 02:33 PM
It works fine for me on visual c++ 6.0, what compiler are you using? You don't need to include windows.h if you are using glut unless you are using windows code somewhere else in your app but I doubt that is your problem.