Okay, I’m a newbie and I just finished typing in one of my first OpenGL programs to make a window, but when I goto compile it, I get a pleathora of errors, like glViewPort undeclaried identifier and such. I included windows.h, gl,h, glu.h, and glaux.h and the libraries OpenGL32.lib, GLu32.lib and GLaux.lib. I’m using Visual C++. Please help!
Function names are case sensitive (this is what you got wrong here), pay close attention to the exact function name and the argument types especially in C++. If something is unresolved you could try looking in the header file you expect to find it in.
I just copied the code from NeHe’s tutorials, so unless he got something wrong, I don’t think it’s a function name.
Do I need other libraries, because some other tutorials have different library files?
You have to get very specific, posting questions in general terms with misspelling of function names will not get your problem resolved.
On the face of things it looks OK, you need the headers at compile time, the libs at link time and the dlls at runtime.
If it ain’t working you may be missing something but not for simple stuff like glViewport.
I can’t get much more specific than that, unless i list out all the 102 errors I get…
You´re sure you included <gl/gl.h> and not <gl.h> ?
You have to check, that your compiler is able to find all include files (therefore <gl/gl.h>, because the gl directory is usually not a search-directory for include files) and that it is also able to find all libraries.
This sounds pretty much like a linker error, so take a closer look at your libraries.
That´s all i can say.
I included the gl directory as a inculded directory, and theres nothing wrong with my library files; they’re there and I spelled them correctly.