Skip to main content
gamedev.net
🔒 Locked

Installing Glut on Dev C++

Started by twin892 Sep 12, 2006 at 9:34 PM 5 replies 3.3k views
Original Post
twin892
twin892
I have been trying to set up OpenGL for Dev C++ for the last 4 hours. I can't get it to work. when I try to compile something it'll say error on line 50 in the glut.h file. "redeclaration of C++ built-in type 'short'" is the error. the only header file included in the program is glut.h so its nothing with outdated glaux libraries or anything. I am taking the glut.h file from nate robinsons site. The program is taken right from this link http://www.opengl.org/resources/code/samples/redbook/hello.c I just copy it all just to see if the compiler is setup properly. Thank you for your time reading this post.
ade-the-heat
ade-the-heat
err, I don't think you do need to build glut for your compiler - it's a libary.
The poster has probably for something wrong in his libs/dlls/includes in the project settings.
twin892
twin892
I am fairly new to programming so do I have to like link something up with the glut.h file or something like that? I would definately appreciate any help.
Norling
Norling
Open Dev C++. Click "Tools" on the menu, the choose "Check for Updates/Packages...". On the new panel, choose devpaks.org as your devpack server (this was the only one I got to work, but you may have others that are as good). Click check for updates, find and select glut, and Download selected. You can find glfw (which I think is better than glut), DevIL, and several other good libraries there too. Note that these libraries aren't necessarily the newest version, but I have had no problems so far. At least, they should be good enough for learning purposes.
When you now start a new project, you can select a glut project, which shows you some examples, and has a correct linker directive (telling the compiler to link to the right files is something people commonly have troubles with).
Norling
Norling
By the way, when you install glut the way I described, I think it installes glut.dll to your systems folder, but if you need to run your project on another machine where glut is not installed, you need to have the dll in the same folder as your exe (or copy it to the systems folder on the other machine).
twin892
twin892
It works! You Sir are brilliant. I thank you so much for your time! thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.