Original Post
I'm testing an opengl project in Dev-C++. But, I'm getting the following error ...
In file included from main.cpp:1:
C:/Dev-Cpp/include/GL/glut.h:50: error: redeclaration of C++ built-in type `short'
make.exe: *** [main.o] Error 1
Execution terminated
CODE:
#include
void myinit()
{
// attributes
glClearColor (1.0, 1.0, 1.0, 1.0);
glColor3f(0.0,0.0,0.0);
//set up viewing
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-2.0, 2.0, -2.0, 2.0);
glMatrixMode(GL_MODELVIEW);
}
void display()
{
glBegin(GL_LINES);
glVertex2i(0,0);
glVertex2i(10,10);
glEnd();
glFlush();
}
int main(int argc, char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow("Koch Snowflake");
glutDisplayFunc(display);
myinit();
glutMainLoop();
}
PLEASE HELP.
In file included from main.cpp:1:
C:/Dev-Cpp/include/GL/glut.h:50: error: redeclaration of C++ built-in type `short'
make.exe: *** [main.o] Error 1
Execution terminated
CODE:
#include
void myinit()
{
// attributes
glClearColor (1.0, 1.0, 1.0, 1.0);
glColor3f(0.0,0.0,0.0);
//set up viewing
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-2.0, 2.0, -2.0, 2.0);
glMatrixMode(GL_MODELVIEW);
}
void display()
{
glBegin(GL_LINES);
glVertex2i(0,0);
glVertex2i(10,10);
glEnd();
glFlush();
}
int main(int argc, char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow("Koch Snowflake");
glutDisplayFunc(display);
myinit();
glutMainLoop();
}
PLEASE HELP.