View Full Version : Newbie - glut.h

12-07-2001, 09:46 AM
Hi I am an absolute beginner. using win200 and microsoft visual studio.h
I have some source code to modify with but am having problems with #include <gl\glut.h> When I compile it says one error, cannot find glut.h I have no idea what I am doing so I am probably missing out something totally obvious.

Any help?


12-07-2001, 09:56 AM
Have you place the glut.h files in the include\GL folder of your compiler?

12-07-2001, 09:57 AM
Do you have the glut include files on your computer. If not, you should be able to find them somewhere here around opengl.org.

Secondly, is gl\glut.h in your include path?

12-07-2001, 10:11 AM
I have the files on my computer.
I have added the glut.h file to my project (I am not that adept with microsoft vc++ though so does this mean it is in the include path). glut.h is in the same directory as my source code.
Thanks. So any more help?

12-07-2001, 10:14 AM
Hi Doug,

Well, firstly, you need to upgrade to windows2000. No one's used win200 since... ok, that joke's not going anywhere.

Make sure you've got glut.h in your [MS Visual Studio]/vc98/include/gl directory. If you don't, then you need that plus a couple other things. Go here: http://www.xmission.com/~nate/glut.html
get the goods and read the readme's.

Oh yeah, and when you create your project, create a new empty win32 console app. Create a file called main.cpp and include it into the project. The only #include line you need at the top is #include <gl/glut.h>. The rest of the file can be any glut program such as the ones in the red book.

No messing with Project --> Settings or anything. Glut is pretty sweet. http://www.opengl.org/discussion_boards/ubb/smile.gif

12-07-2001, 10:19 AM
Thanks JMG. (and everyone else)
I am ahead of you though. I knew I could remember having a similar problem with opengl so I looked for and openglthingy.h and found where it was so I popped glut.h in there and problem sorted.

12-07-2001, 10:20 AM
er.. You need to move glut.h into something like c:\Program Files\Microshaft Visual Studio\vc98\Include\Gl

Then glut32.lib goes in the vc98\lib and then finally, glut32.dll goes into c:\winnt\system32

Then you should be golden.