Skip to main content
GameDev.net gamedev.net
🔒 Locked

OpenGL Dev-C++ compile error

Started by kmdelery Sep 21, 2010 at 12:34 PM 1 replies 1.2k views
Original Post
kmdelery
kmdelery
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.
BitMaster
BitMaster
Quote:
Original post by kmdelery
PLEASE HELP.


Remove Dev-C++ for reasons like this and many more. Visual Studio Express Edition is completely free. There is Code::Blocks. There is Eclipse with CDT and many other alternatives. Even a text editor and command line invocation of a recent compiler will be much better to work with than Dev-C++.
ajm113
ajm113
Yeah I agree after some time working with compilers and creating my own GUIs I think I could even make a better C++ GUI compiler then Dev C++ UI if I had the time and money I would no doubt. :)

Just go with VS2005+, you can buy older versions online under 100 bucks even. Trust me, I used to work with Dev C++ and Visual Studio is way better after some time using it.
Check out my open source code projects/libraries! My Homepage You may learn something.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.