Errors while Compiling in BC 5

I am on a machine w/ Borland c++ 5.1 and I got opengl.dll and glut. I can’t compile any files from the “redbook” because it gives me a declaration error in glut.h whenever it see something like:

WINGDIAPI void APIENTRY Funtion (Parameters);

any ideas?

-Thanks in advance
ngill@imsa.edu

Sorry the error is in gl.h… but it’s still the same error

Maybe you just forgot to include <windows.h>
right before <gl\gl.h>.

thanks that worked! but can anyone tell me where i can find the source for the prototypes in gl.h?? can someone help me set this up?? I’ve gotten most of it done… this is the only error I have left:

Unresolved Extern for (every function in gl…h) in light.obj

-Thanks

Ok, screw this… more I try to fix it the more errors i get…

Does anyone else out there use Borland 5.02 compiler??? or know how to get it working with Opengl programming and stuff?? Your help would be GREATLY appreciated… Just tell me step by step which files should be where and where I could obtain those files from.

-Thanks
Navreet

dude, it’s ok… you probably just forgot to link gl libraries man…

I use Borland 5, and everything will work up to the point where it links to the exe(this is when I compile any glut progam). I get some strange error that tells me it either can’t link to glut32.dll or that “Extern _‘exit’ is not qualified with _import.” can anyone help?

If you including glut.h, you don’t really need to include gl.h because glut does it for you, AND it defines the structures that gl.h uses so you don’t need windows.h. It also has some pragma statments that will load the proper libraries for you, but these statements might just work with VC++. I don’t use Borland much, but I have the free compiler installed at home that I can use to check on some things for you. You probably just are having problems with the libraries linking in. Borland also uses a different library format from MS so the VC++ libraries WILL NOT work with Borland. I could swear that the Borland compiler I got came with it’s own OpenGL libraries, but I could be wrong about that.