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\
opengl32.dll, glut32.dll and glu32.dll
isn’t that correct ?
I didn’t compile the glut. Do I have to ?
any help would be greatly appreciated…
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!
did you try to convert the dll’s to borland format.
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. */
/* XXX This is from Win32’s <windef.h> */
if (_MSC_VER >= 800) | | defined(_STDCALL_SUPPORTED)
define APIENTRY __stdcall
/* XXX This is from Win32’s <winnt.h> */
if (defined(_M_MRX000) | | defined(_M_IX86) | | defined(_M_ALPHA) | | defined(_M_PPC)) && !defined(MIDL_PASS)
define CALLBACK __stdcall
/* XXX This is from Win32’s <wingdi.h> and <winnt.h> */
define WINGDIAPI __declspec(dllimport)
/* XXX This is from Win32’s <ctype.h> */
typedef unsigned short wchar_t;
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