I’m trying to compile a sample code from an OpenGl book and it’s giving me that main is being overloaded. I’m not really educated about overloading nor OpenGL; can someone explain why it’s overloaded and how to fix the compiler issue? I feel like this is probably due to my lack of knowledge in overloading but this is from the book, so I would assume it is correct.
#include <GL/glut.h>
#include <GL/GL.h>
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
}
void main(void);
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
- Sean