Advertisement Jump to content
Sign in to follow this  
Adam Gleason

OpenGL Help with a book error

This topic is 4882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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()

Share this post

Link to post
Share on other sites
try this one
#include <stdlib.h>
#include <system.h>

and then


i think you need the related header file for this function

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!