Friday, February 27, 2009

How to get glut working in Dev C++

If you are having trouble getting this program working in Dev C++ in Windows

Step 1: Follow these instructions:
http://www.astahost.com/info.php/installing-glut-dev-c_t14192.html

Step2:
Click File>New>Project
In the tabs across the top click "Multimedia" then click on the icon with the words glut under it.
Save the project file.
This creates a new project called "main.cpp"
You can run it and check it out if you want but then:
Click "Save As" and save the file but rename it simple. cpp
Then copy all of the code from the original simple.cpp and paste it over all the code in this file.
Comment out this line:
#include "../../shared/gltools.h"

use these two lines instead (I stole them from that main.cpp it created earlier):

#include <GL/glut.h>
#include <stdlib.h>

Now compile and run it. No really. Do it.

No comments:

Post a Comment