New to OpenGl, I’m getting errors on the Borland 55 command-line cmpilr – 'Multiple decalaration of ‘WINGDIAPI’ and similar messages… Has anyone heard of this ?
I did as follows:
glut.h, glu.h, gl.h --> \include\gl
opengl32.lib, glut32.lib, glu32.lib – \lib\
and
opengl32.dll, glut32.dll and glu32.dll
–> Win\system
isn’t that correct ?
I didn’t compile the glut. Do I have to ?
any help would be greatly appreciated…
Tia MikeH
AAH! I’ve got those same damn problems too! I keep getting “multiple declaration” errors, and I’m new to oGL also. So anything you find out, please tell me!
Hehehe, you use the makelib.exe file that comes with Borland cpp. Then you have to create lib’s and headers for glut. If you use the standard ones it gives errors. The standard opengl libraries however work fine.
Read up on the makelib.exe to see what parameters it takes etc. I can’t remember offhand. I know it takes the dll as an argument though.
Where did you get the glut.h you are using? With the version I have, you technically don’t need to include glu.h or gl.h because the glut.h takes care of that for you. It also takes care of some other things for you. Typically, you need to include windows.h BEFORE you include gl.h becuase windows.h defines WINGDIAPI and APIENTRY, which is then used in gl.h. The version of glut.h that I got takes care of this for you with the following code…
/* GLUT 3.7 now tries to avoid including <windows.h>
to avoid name space pollution, but Win32’s <GL/gl.h>
needs APIENTRY and WINGDIAPI defined properly. */
if 0
define WIN32_LEAN_AND_MEAN
include <windows.h>
else
/* XXX This is from Win32’s <windef.h> */
ifndef APIENTRY
define GLUT_APIENTRY_DEFINED
if (_MSC_VER >= 800) | | defined(_STDCALL_SUPPORTED)
Thanks Deiussum, RedZen, Stone, JLawson – I think I got it, but I’m still not sure if it’s right. I downloaded some glut version – supposedly borland specific – from a site pointed to in an early post on this board, rnamd the .h’s, dlls and libs, and copied over them. Deiussum: I copied/pated this thread and seved it, for the makefile info, in case I do have to convert old files – (tho I didn’t really want to unless I had to, but still might). A friend sent me an opengl image but I don’t think it is shading correctly. Anyone tell me where I can get the ‘Redbook’ examples ? to test it more thoughly ? Help greatly appretiated… thanks again… MikeH