I am working on developing a program using Visual Studio 2003 but am having
problems getting my program to find my GL.h and GLU.h, and I am guessing it
will have the same problems trying to link to the .lib and .dll files. What
do I all need to do to get this to properly compile and link. Here is what I
have done so far.
Inside my main project directory, I added a folder called "OpenGL" and
inside this folder are 3 sub-folders, "include", "lib", "bin" with the .h
files going into include, the .lib files into lib and the .dll files into bin.
I right-clicked onto my project and clicked on "Properties". In the left
list, I clicked on C\C++ and then on the sub-option "General". On the
"Additional Include Directories" I added the path
"$(ProjectDir)\OpenGL\include" to the listing. Then on the Linker option, I
added 2 paths to the "Additional Library Directories" with
"$(ProjectDir)\OpenGL\bin" and "$(ProjectDir)\OpenGL\lib".
But after doing this and cleaning my project and re-compiling, I get a whole
bunch of compiler errors saying "fatal error C1083: Cannot open include file:
'GL.h': No such file or directory". I have in my .h file added the line:
#include "GL.h"
#include "GLU.h"
Does anyone have any ideas on what else I need to do to be able to include
these files into my project? Thanks!
Todd Dobmeyer - 24 Sep 2007 19:06 GMT
> I am working on developing a program using Visual Studio 2003 but am having
> problems getting my program to find my GL.h and GLU.h, and I am guessing it
[quoted text clipped - 22 lines]
> Does anyone have any ideas on what else I need to do to be able to include
> these files into my project? Thanks!
Well I found that I already had GLU.h inside my VisualStudio directory
located at "C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\gl" but unfortunately, I cannot get it to find
this .h file. I have just used the statement
#include "GLU.h"
and it says it cannot open the include file. What do I need to do to find
the one include with my Visual Studio install? Thanks again!
Todd Dobmeyer - 24 Sep 2007 19:14 GMT
> #include "GLU.h"
>
> and it says it cannot open the include file. What do I need to do to find
> the one include with my Visual Studio install? Thanks again!
I am a moron...I needed
#include <gl\glu.h>
JP - 25 Sep 2007 01:48 GMT
You might need to see if the Include directories is correctly set under
Tool->Options
->Projects and Solutions->VC++ Directories.
you might need to that include path as well.
Thanks
JP
> > #include "GLU.h"
> >
[quoted text clipped - 4 lines]
>
> #include <gl\glu.h>