View Full Version : Setup
07-09-2001, 05:50 PM
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..
07-09-2001, 06:22 PM
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.
07-10-2001, 05:54 AM
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.
07-10-2001, 06:15 AM
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>
/* XXX This is from Win32's <windef.h> */
# ifndef APIENTRY
# define GLUT_APIENTRY_DEFINED
# if (_MSC_VER >= 800) &#0124; &#0124; defined(_STDCALL_SUPPORTED)
# define APIENTRY __stdcall
# define APIENTRY
/* XXX This is from Win32's <winnt.h> */
# ifndef CALLBACK
# if (defined(_M_MRX000) &#0124; &#0124; defined(_M_IX86) &#0124; &#0124; defined(_M_ALPHA) &#0124; &#0124; defined(_M_PPC)) && !defined(MIDL_PASS)
# define CALLBACK __stdcall
# define CALLBACK
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
# ifndef WINGDIAPI
# define GLUT_WINGDIAPI_DEFINED
# define WINGDIAPI __declspec(dllimport)
/* XXX This is from Win32's <ctype.h> */
# ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
# define _WCHAR_T_DEFINED
07-10-2001, 06:42 AM
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
07-10-2001, 07:00 AM
I posted a response to this thread too that might help you.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.