I’ve written this code:
int main (int argc, char** argv)
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_double | GLUT_RGB);
glutInitWindowSize (400, 100);
glutInitWindowPosition (100, 100);
glutCreateWindow (“My OpenGL-Window”);
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!!!
And usually its in a subdirectory called GL.
So you might have to write something like <GL/gl.h> …
[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?
The only wrong thing with your code I can see is
that propaply should be
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++ ?
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.
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:
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.
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