HELP WITH NEWBIE@OPENGL!!!!!!!!!!!!!!!!!
Hello
My opengl books just arrived and i''m haveing trouble getting glut set up. I include the glut.h header file. I link the appropriet opengl libraries and glut libraries into my application. However my opengl functions/commands are undeclared as somethings not getting included right/linked. Please tell me how to fix asap. Thanks
ECKILLER
ECKILLER
There are more than one possibilities what went wrong.
First of all it would be very helpful to know EXACTLY what your compiler complains about.
So I can only guess:
1. you said you included the glut.h. Did you set your include paths correclty ? ( Compiler error: Could not open include file "glut.h" or something, but perhaps your compiler does not complain about not finding the include file. Check this Point)
2. In my experience, the glut.h include file includes the gl.h and the glu.h headers, too.(because it uses GLint and so on. Assuming the error to be a compiler error, you could simply include gl.h and glu.h right before glut.h, but not sure )
3. If the error is a link error, then you perhaps missed to specify the crrect library paths in your project''s settings. To your text, I assume, that you link your source against Opengl32.lib, glu32.lib and glut32.lib (all 3). Check this.
4. You did not tell what compiler you use. As far as I know, the borland compiler does not work fine with libraries compiled for MSVC. Any other compiler should link the MSVC Libs correctly(Be sure to have the right libs for your compiler)
Hope this helps,
NextS
First of all it would be very helpful to know EXACTLY what your compiler complains about.
So I can only guess:
1. you said you included the glut.h. Did you set your include paths correclty ? ( Compiler error: Could not open include file "glut.h" or something, but perhaps your compiler does not complain about not finding the include file. Check this Point)
2. In my experience, the glut.h include file includes the gl.h and the glu.h headers, too.(because it uses GLint and so on. Assuming the error to be a compiler error, you could simply include gl.h and glu.h right before glut.h, but not sure )
3. If the error is a link error, then you perhaps missed to specify the crrect library paths in your project''s settings. To your text, I assume, that you link your source against Opengl32.lib, glu32.lib and glut32.lib (all 3). Check this.
4. You did not tell what compiler you use. As far as I know, the borland compiler does not work fine with libraries compiled for MSVC. Any other compiler should link the MSVC Libs correctly(Be sure to have the right libs for your compiler)
Hope this helps,
NextS
Thanks the problem turns out to be i dont have the glut dll in the right directory. Can you direct me to where i need to put the glut.dll
Thanks
ECKILLER
Thanks
ECKILLER
ECKILLER
So it''s no compiler/linker Problem ?
Theres several possibilities to place the glut32.dll.
One place is your windows system32 directory (don''t know exactly, but should be the place where you have your opengl32.dll and glu32.dll )
The other place is where you have your application (.exe file) stored.
You only need to make sure, that your .exe filr can find the dll. So it should possible to put it everywhere you PATH env.Variable points to.
NextS
Theres several possibilities to place the glut32.dll.
One place is your windows system32 directory (don''t know exactly, but should be the place where you have your opengl32.dll and glu32.dll )
The other place is where you have your application (.exe file) stored.
You only need to make sure, that your .exe filr can find the dll. So it should possible to put it everywhere you PATH env.Variable points to.
NextS
According to your previous posting, you seem to think, that you need the glut32.dll at compilation time. You do not.
But do you have the glut32.lib ? Not .dll !!
The compiler/linker will not complain about missing dll''s.
The simplest way to find out where the glut32.lib should go is to enter windows'' find dialog and type opengl32.lib.
NextS
But do you have the glut32.lib ? Not .dll !!
The compiler/linker will not complain about missing dll''s.
The simplest way to find out where the glut32.lib should go is to enter windows'' find dialog and type opengl32.lib.
NextS
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement