Hi,
I’ve written this code:
#include <windows.h>
#include <glut.h>
#include <opengl.h>
#include <glu.h>
int main (int argc, char** argv)
{
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_double | GLUT_RGB);
glutInitWindowSize (400, 100);
glutInitWindowPosition (100, 100);
glutCreateWindow (“My OpenGL-Window”);
init ();
glutDisplayFunc (display);
glutMainLoop ();
return 0;
}
But my compiler tells me:
fatal error C1083: Include-file cant be opened: ‘opengl.h’: No such file or directory
So where can I get this file? I downloaded MS opengl 95, but there was nothing
Please help me!!!
Cu
Its
#include <gl.h>
And usually its in a subdirectory called GL.
So you might have to write something like <GL/gl.h> …
Cheers!
[This message has been edited by AndersO (edited 05-30-2001).]
Sorry, when I trie it like tihs, it doesnt work!!!
Is there a failure in my code?
Bob
May 30, 2001, 9:46am
4
The only wrong thing with your code I can see is
#include <glut.h>
#include <opengl.h>
#include <glu.h>
that propaply should be
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
Otherwise, what does it say when you change the “opengl.h” to “GL/gl.h” and compile?
Hi, thanks, I’ll trie it like that!
Sorry, it still doesnt work…
Maybe I did a mistake with linking to the files in the options of VC++ ?
Bob
June 1, 2001, 12:19am
7
What does it say? Does it still complain about a missing header or what? Not much we can do unless you tell us what exactly is wrong.
system
June 3, 2001, 12:28am
8
Hey friend,
I think I have solved the problem.
Firstly, check from your computer by using the search facility in the start command to locate where are the gl files. They normally should be in the GL folder of your C++ builder.
Secondly, type the following:
#include <windows.h>
#include <gl/Gl.h>
#include <gl/Glu.h>
#include <gl/glut.h>
Remember -
if your gl file is under the GL folder, you must include the gl/ command.
you must include the windows.h file or else there will be plenty of errors. The gl.h, glu.h files will not be able to run.
you may need to download glut.h file from this site.
That should solve your worries.
iss
June 3, 2001, 8:26am
9
Remember, as alluded to above the include must not only be “correct” in the code, it must actually point to something!
The glut.h file should live in an */Include/GL directory. If you’re on WIN32 look at http://graphics.stanford.edu/courses/cs148-99-summer/programming_windows.html