Cannot open "glut.h"...
-
Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now
#include <gl/glut.h>
give error
c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory
I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer
More Object Oriented then C#
-
Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now
#include <gl/glut.h>
give error
c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory
I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer
More Object Oriented then C#
Go to project>settings and in the object library module box add the following to link to OpenGL Libraries Opengl32.lib glaux.lib glu32.lib Now compile Does this solve your problem Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar
-
Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now
#include <gl/glut.h>
give error
c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory
I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer
More Object Oriented then C#
Make sure that in your project settings you have added the path to the include folder of openGL in the "Additional Include Directories" option. This option can be found in the C/C++ tab -> General.
-
Go to project>settings and in the object library module box add the following to link to OpenGL Libraries Opengl32.lib glaux.lib glu32.lib Now compile Does this solve your problem Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar
It's not a link error but a compile error. So, the first thing to check is the include directories, not the library directories. But anyway, this problem will probably occur later if didn't add the library directory to his project ;).
-
Make sure that in your project settings you have added the path to the include folder of openGL in the "Additional Include Directories" option. This option can be found in the C/C++ tab -> General.
-
Typically OpenGL files are placed in the GL subdirectory under the main VC++ include directory which is why the include statements say GL/glut.h. I think he should make sure that glut.h is in with the other OpenGL headers.
As you all guyes sugested, Its not a linking problem, but compliation problem. I have mentioned all the libs like GL32.lib etc.... Amazing fact is that I am including two files from include/gl directory and those are gl.h and glu.h but no error at all! I put GLUT.h in the same directory, and following statment prodcues error
#include <gl/glut.h>
Strange... Any clue now? Polite Programmer
More Object Oriented then C#