PDA

View Full Version : Too many errors!



04-21-2002, 01:59 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif . Is there
anything that i can do?

thanks

mosh

zed
04-21-2002, 02:13 PM
stick #include <windows.h> at the top of the file ie before #include <GL/gl.h>

04-21-2002, 02:20 PM
it is above it.
http://www.opengl.org/discussion_boards/ubb/confused.gif

pongsak.a
04-21-2002, 08:04 PM
Are you links to "opengl32.lib" and "glu32.lib" ?

Indiana
04-21-2002, 08:28 PM
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?