View Full Version : Error in gl.h ?

11-12-2001, 08:38 AM
Hi there!

I've got a problem with a code snippet from a book. I've typed it like in the book, but when I want to compile it with lcc-win32, bcc or Dev-C++ 4, it don't work. Message is that there would be a hell lot of errors in gl.h.
The code is from "OpenGl Programming Guide". It's release 1 from '93, but does this matter? PLZ help me, otherwise I'll have 2 use DX and I really wouldn't like it...
cu all and thx,

Update: When compiling it with Dev, computer locks up. So does it when using the newest version of lcc.
Who knows help?

[This message has been edited by Maniac (edited 11-12-2001).]

11-12-2001, 10:42 AM
have you remembered to link to the opengl32.lib file? (or whatever its called on your system).

If not, then you'll get errors saying it can't find the code for all the prototypes.

(e.g. to link type something I'd type:
"bcc32 test.c opengl32.lib"
where bcc32 is the borland free compiler)

11-12-2001, 10:50 AM
Some examples of the errors you're seeing would help.

11-12-2001, 10:55 AM
Rob is probably right.

In Visual C++ 6.0, go to Project -> Settings

Then click on the Link tab and there should be an edit box where you type in the names of libraries you want to import. Add the name opengl32.lib to that list. I believe this will cover the gl.h and glu.h headers. In order to use glut.h, you'll also need to add glut32.lib.


[This message has been edited by Owlet (edited 11-12-2001).]