hi all.
i finally figured out how to install the newest glew and freeglut under dev-c++. it is very easy.
before installing glew and freeglut, download the newest driver for your video card for the newest opengl support.
- go to http://www.bloodshed.net/dev/devcpp.html and download Dev-C++ 5.0 beta 9.2 (4.9.9.2) with Mingw/GCC 3.4.2 (i couldnt get it to work with the new version and the 64 bit compiler); this is the version that works for me.
- install it.
- go to tools check for updates/packages.
- choose devpaks.org for the server.
- hit check for updates.
- scroll through until you find freeglut, select it. the glew package doesnt work and is outdated so dont select it.
- hit download selected.
- now freeglut should work.
- to get the newest glew go to The OpenGL Extension Wrangler Library - Browse /glew/1.9.0 at SourceForge.net and download glew-1.9.0-win32.zip.
- open the glew-1.9.0 folder in the zip file and paste all its contents into the dev-c++ main directory.
- then copy the glew32.dll file in the bin folder to your %systemroot% (this directory changes based on what version of windows you’re using, for windows 7 its “Windows”). to find your systemroot press “windows key + r” then type
“set systemroot” (no parenthesis).
your system is now setup.
some more info.
to test out the source code at the bottom of this page:
restart dev-c++ and open a new project click on the multimedia tab and there should be a freeglut option click it.
you will new to add a linker option for glew so go to the project tab, then project options. go to the parameters tab and under linker you shoud see a whole bunch of “words” starting with -l and seperated by spaces. all of the options in the linker column are necessary to run freeglut; these are:-lfreeglut -lglu32 -lopengl32 -lwinmm -lgdi32 you need to add the linker for the glew library; which is: -lglew32.
copy this code into your project and compile and run. if it works you will see a white fully working screen. if glew fails, im not sure what happens, but, you wont see a fully working white screen. if you get a comile error you done something wrong. if you’re error says “undefined reference to” youre missing one or more linkers. if not you either misspelled the linker or something went wrong with your installation.
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <cstdio>
int main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitWindowSize(640,480);
glutInitWindowPosition(10,10);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("Blah");
GLenum err = glewInit();
if (err == GLEW_OK) {
glutMainLoop();
}
// if GLEW is found, the program will show a "dirty" window.
// if not, the window will only be shown only for a split second.
return 0;
}
the opengl linker option is: -lopengl32 by the way.
good luck getting started!