Advertisement

Setting Up OpenGL

Started by March 19, 2009 12:12 AM
3 comments, last by Caste 15 years, 8 months ago
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
Try this:
#include <GL/glut.h>

As most of the time the GLUT header is inside the GL folder.
Advertisement
are you sure you installed glut?
[size="1"]
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?
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.

This topic is closed to new replies.

Advertisement