PDA

View Full Version : Noob question



Xx Shinwa xX
08-22-2004, 10:28 AM
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!

dorbie
08-22-2004, 10:33 AM
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.

Xx Shinwa xX
08-22-2004, 10:42 AM
I just copied the code from NeHe's tutorials, so unless he got something wrong, I don't think it's a function name.

Xx Shinwa xX
08-22-2004, 11:13 AM
Do I need other libraries, because some other tutorials have different library files?

dorbie
08-22-2004, 11:22 AM
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.

Xx Shinwa xX
08-22-2004, 12:01 PM
I can't get much more specific than that, unless i list out all the 102 errors I get...

Jan
08-22-2004, 01:32 PM
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.

Jan.

Xx Shinwa xX
08-23-2004, 08:16 AM
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.