Too many errors!

I’m trying to start learning openGL but whenever i try the simpelest of programs( trying to open a window ) i get the same error over and over again.

…\BC45\INCLUDE\GL/GL.H 832: Decleration
santax error
…\BC45\INCLUDE\GL/GL.H 833: Variable WINGDIAPI is initialised more than once

this happens for every line thereafter. i’m using Borland 4.52 because i’m a poor student and it was free . Is there
anything that i can do?



stick #include <windows.h> at the top of the file ie before #include <GL/gl.h>

it is above it.

Are you links to “opengl32.lib” and “glu32.lib” ?

If you’re getting syntax errors while trying to compile, it’s a compiler problem, not a linker problem. I suspect that Borland C++ 4.5 is just too old - i ran into silly incompatibilities last time i tried to use it to compile modern DOS C code, let alone OpenGL code.

Download the Borland C++ 5.5 compiler, it’s free and one of the most modern and powerful compilers you can get. And it’s free (can’t stress that enough)!!! You can still use the 4.5 IDE to edit your code, but use the 5.5 command line tools to do the actual compiling and debugging. Hell, I think it even comes with all the GL headers in the package.

Possible downside: you won’t be able to make DOS or Win16 programs, but who really wants to any more?