• Advertisement
Sign in to follow this  

Setting Up OpenGL

This topic is 3232 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I suspect that i installed openGL on my computer wrong because I am getting an error about glut.h. I am following this tutorial, http://www.cprogramming.com/tutorial/opengl_projections.html but when i try to compile it. The error i get is LINK : fatal error LNK1104: cannot open file 'glut.h' I have the files in... C:\Program Files\Microsoft Visual Studio 9.0\VC\includeGL.H GLAUX.H glext.h glprocs.c glprocs.h GLU.H glut.h list.txt wglext.h

Share this post


Link to post
Share on other sites
Advertisement
Try this:
#include <GL/glut.h>

As most of the time the GLUT header is inside the GL folder.

Share this post


Link to post
Share on other sites
GL/glut.h doesn't work and yes i installed it. (i think)

C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\gl
GLAUX.LIB
GLU32.LIB
glut32.lib
OPENGL32.LIB

i copied the DLLs into C:\WINDOWS\system32

I don't quite remember what i did with the def file...


Maybe its the compiler settings... I use Visual C++ 2008 Express Edition.
If it is the compiler settings, how do i set up the compiler/profile to make it work?

Share this post


Link to post
Share on other sites
Well the compiler is looking for the header file glut.h, which should be in one of your include paths (if that C:\Program Files\Microsoft Visual Studio 9.0\VC\includeGL.H meant C:\Program Files\Microsoft Visual Studio 9.0\VC\include with the file GL.H, then this is weird, the GL header usually is in an GL subdir).

If you get rid of that error and your program compiles correctly, then the linker will look for the .lib library.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement