Results 1 to 3 of 3

Thread: OpenGL Header errors

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195

    OpenGL Header errors

    I'm not sure if this is a widely-known problem or not but here goes:

    When I include the Gl.h file in 4 or more files (Header files for classes) I start getting compilation errors, saying that the GL.h file has errors in it:

    d:\program files\visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
    d:\program files\visual studio\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
    d:\program files\visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.

    I'm guessing that there is nothing wrong with the GL.h file, but why does the inclusion of the header file create these errors?

    If you need more information, please ask.
    Using Visual Studio .NET 2005

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Under Windows, you need to include windows.h before GL.h.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    Thank you!
    Using Visual Studio .NET 2005

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width