Hello, If I want to compile this code in bilder5 I get this error message:
[C++ Error] GLUT.H(140): E2337 Only one of a set of overloaded functions can be “C”, and in glut.h it mark this row(row 140): extern _CRTIMP void __cdecl exit(int);
Here is the code:
#ifdef FLAT
#include <windows.h>
#endif
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glut.h>
int main(int argc, char* argv[])
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB );
glutInitWindowSize(500,400);
glutInitWindowPosition(0,0);
glutCreateWindow(“Az elso OpenGL programom”);
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.0,0.0,1.0);
glOrtho(-4.0,4.0,-2.0,2.0,-2.0,2.0);
glBegin(GL_POLYGON);
glVertex2i(-1,1);
glVertex2i(1,1);
glVertex2i(1,-1);
glEnd();
glFlush();
getchar();
return 0;
}
Anyone can help me?