Jump to content
  • Advertisement
Sign in to follow this  
Adam Gleason

OpenGL Help with a book error

This topic is 4669 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
Advertisement
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

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!