View Full Version : OpenGL window

04-07-2005, 08:08 PM
Hey everyone. I was checking out the nehe tuts at nehe.gamedev.net and for the first lesson that creates a window for stuff to be rendered to, it uses glaux! >< bleh. As I was looking for a better solution to glaux I saw on these forums that you can use glut to make windows.

However, Im not quite sure on how to go about doing this... could somebody give me a good hard shove in the right direction to create a window and have it wait for stuff to be rendered to it?

Thank you so much for your time.


04-07-2005, 08:26 PM
You need to get glut32.dll,glut.h and glut.lib files.Search for them online,and install them as insructed.Then jus say #include<glut.h> before your code.And you can find the main() function using GLUT on the opengl.org.Try the Red book.Cheers.

04-08-2005, 09:14 PM
X( Got the stuff typed out however

[Linker Error] Undefined reference to '_glutInitWithWindow@12'
[Linker Error] Undefined reference to '_glutCreateWindowWithExit@8'
[Linker Error] Undefined reference to 'glutCreateMenuWithExit@8'


Any help is appreciated.


04-09-2005, 12:08 PM

Go to Project Options, which is in the project menu in Dev-c++.

In the feild called 'Further object files or linker options' type the line:

-lopengl32 -lglu32 -lglut32

press Ok.

Your window should open now!

04-09-2005, 12:43 PM
Originally posted by caldiar:

[Linker Error] Undefined reference to '_glutInitWithWindow@12'
[Linker Error] Undefined reference to '_glutCreateWindowWithExit@8'
[Linker Error] Undefined reference to 'glutCreateMenuWithExit@8'
try to do this before including glut.h :

If everything said on this thread fails, you may want to try FreeGlut, OpenGLUT, or even OpenGLEAN (http://openglean.sourceforge.net/) , all are enhancements over the original aging GLUT.

04-09-2005, 03:53 PM
Thanks guys for your replies.

In response to Aliorithm - I already did that and I managed to cut out all but those linker errors by doing so. Thanks though =)

In response to ZbuffeR - Thanks man, Ill try this out and see if it works.

I appreciate the help guys. Thank you very much for your replies!