Results 1 to 7 of 7

Thread: Setup

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Altanta, Ga. USA
    Posts
    5

    Setup

    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

  2. #2
    Member Contributor
    Join Date
    Jul 2001
    Location
    Camarillo, CA, USA
    Posts
    58

    Re: Setup

    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!
    PROGRAMMERS SHALL RULE THE WORLD

  3. #3
    Guest

    Re: Setup

    did you try to convert the dll's to borland format.

  4. #4
    Member Contributor
    Join Date
    Jul 2001
    Location
    South Africa
    Posts
    52

    Re: Setup

    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.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Setup

    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...

    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) &amp;#0124; &amp;#0124; defined(_STDCALL_SUPPORTED)
    #    define APIENTRY    __stdcall
    #   else
    #    define APIENTRY
    #   endif
    #  endif
       /* XXX This is from Win32's <winnt.h> */
    #  ifndef CALLBACK
    #   if (defined(_M_MRX000) &amp;#0124; &amp;#0124; defined(_M_IX86) &amp;#0124; &amp;#0124; defined(_M_ALPHA) &amp;#0124; &amp;#0124; defined(_M_PPC)) &amp;&amp; !defined(MIDL_PASS)
    #    define CALLBACK __stdcall
    #   else
    #    define CALLBACK
    #   endif
    #  endif
       /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
    #  ifndef WINGDIAPI
    #   define GLUT_WINGDIAPI_DEFINED
    #   define WINGDIAPI __declspec(dllimport)
    #  endif
       /* XXX This is from Win32's <ctype.h> */
    #  ifndef _WCHAR_T_DEFINED
    typedef unsigned short wchar_t;
    #   define _WCHAR_T_DEFINED
    #  endif
    # endif
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Altanta, Ga. USA
    Posts
    5

    Re: Setup

    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

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Setup

    I posted a response to this thread too that might help you.
    http://www.opengl.org/discussion_boa...ML/004791.html
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Gl setup
    By PlayBoy in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-24-2002, 11:14 AM
  2. gl setup
    By imported_Jules in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-06-2002, 03:05 PM
  3. Setup
    By Joe in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-12-2001, 03:29 AM
  4. gl setup
    By dago 33 in forum OpenGL: User Software
    Replies: 1
    Last Post: 07-26-2001, 06:11 PM
  5. GL Setup
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 06-06-2001, 02:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean