Help with a book error
ok i am reading that book written by the guys that run this site "Beginning OpenGL Game Programming" and i am only on the first chapter but i can't get the first chapters source file to compile. i have all the librarys -lopengl32 -lglu32 -lglut32 in the project option and i have the win32.lib in the same file that the exe will be in. the errors that i am getting are
'Exit' undeclared(first use this function)
i am using Dev-C++ and here is the source code with a * beside where it has a star in devc++
please tell me some way i can get this to work.
/****************************************************************************
MouseHandler()
Handle mouse events. For this simple demo, just exit on a left click.
*****************************************************************************/
void MouseHandler(int button, int state, int x, int y)
{
switch (button)
{
case GLUT_LEFT_BUTTON:
{
* Exit(0);
} break;
default:
break;
}
// force a screen redraw
glutPostRedisplay();
} // end MouseHandler()
i still get the same erorr
but now with a lowercased e
'exit' undeclared(first use this function)
but now with a lowercased e
'exit' undeclared(first use this function)
try this one
#include <stdlib.h>
or
#include <system.h>
and then
exit(0);
i think you need the related header file for this function
#include <stdlib.h>
or
#include <system.h>
and then
exit(0);
i think you need the related header file for this function
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement