I'm just learning some beginning OpenGL, and I found a site online with an example on how to create a window, but when I try to compile it I get this error:
Error E2337 c:\Program Files\Borland\Bcc55\include\Gl/glut.h 146: Only one of a set of overloaded functions can be "C"
Here's the source code, if it helps.
Any idea why I'm getting this error, or how to fix it?Code:#include <windows.h> #include <Gl/glut.h> //include the glut header file void display (void) { glClearColor (0.0,0.0,0.0,1.0); //clear the color of the window glClear (GL_COLOR_BUFFER_BIT); //Clear teh Color Buffer (more buffers later on) glLoadIdentity(); //load the Identity Matrix gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); //set the view glFlush(); //flush it all to the screen } int main (int argc, char **argv) { glutInit (&argc, argv); //initialize the program. glutInitDisplayMode (GLUT_SINGLE); //set up a basic display buffer (only singular for now) glutInitWindowSize (500, 500); //set whe width and height of the window glutInitWindowPosition (100, 100); //set the position of the window glutCreateWindow ("A basic OpenGL Window"); //set the caption for the window glutDisplayFunc (display); //call the display function to draw our world glutMainLoop (); //initialize the OpenGL loop cycle return 0; }



LinkBack URL
About LinkBacks


