Like Tree1Likes
  • 1 Post By adeyblue

8 Gl.h errors with included windows.h...

This is a discussion on 8 Gl.h errors with included windows.h... within the C++ Programming forums, part of the General Programming Boards category; Hello, I have tried searching the web for a solution to these errors on gl.h, but am unable to find ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    37

    Unhappy 8 Gl.h errors with included windows.h...

    Hello, I have tried searching the web for a solution to these errors on gl.h, but am unable to find a solution to them.

    I get these errors

    Code:
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|177|error: expected identifier before numeric constant|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|177|error: expected unqualified-id before numeric constant|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|177|error: expected unqualified-id before numeric constant|
    for

    Code:
    typedef enum {
    	/* Boolean values */
    	GL_FALSE			= 0,
    	GL_TRUE				= 1,
    
    	/* Data types */
    	GL_BYTE				= 0x1400,
    	GL_UNSIGNED_BYTE		= 0x1401,
    	GL_SHORT			= 0x1402,
    	GL_UNSIGNED_SHORT		= 0x1403,
    	GL_INT				= 0x1404,
    	GL_UNSIGNED_INT			= 0x1405,
    	GL_FLOAT			= 0x1406,
    	GL_DOUBLE			= 0x140A,
    	GL_2_BYTES			= 0x1407,
    	GL_3_BYTES			= 0x1408,
    	GL_4_BYTES			= 0x1409,
    Code:
    And these errors for the rest:
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|961|error: expected declaration before '}' token|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|940|error: expected unqualified-id before numeric constant|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|940|error: expected '}' before numeric constant|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|940|error: expected identifier before numeric constant|
    
    c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\gl.h|930|error: declaration does not declare anything|
    the entire code is:

    Removed by moderator

    Any help would be greatly appreciated. Thanks!!!

    EDIT: OpenGL header removed by moderator.
    Last edited by VirtualAce; 05-29-2011 at 10:52 AM.

  2. #2
    C++ Enthusiast M.Richard Tober's Avatar
    Join Date
    May 2011
    Location
    Georgia
    Posts
    56
    Are you simply trying to compile the actual GL.H header? I'm not sure what's going on here, but if you could elaborate I can try to help. I use linux and Code::Blocks, but I didn't see anyone else replying. Perhaps the ambiguity is the problem?

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    37
    I have included gl.h into my main file. However, I recieve these errors when I try to compile my main file.

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    It might help if you tell us what line 177 is. Copy that line and a few lines before it, and mark the line (or at least make it clear which it is).

  5. #5
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611
    Probably has something to do with that being gl.h from a (old) Linux distribution (This is the MinGW version, completely different), and even then it's been modified. Since you or something else has changed the header files that came with and specifically tailored to your compiler, all bets are off regarding what you'll be able to compile.

    You'll need to reinstall your compiler to get the originals back, and leave them alone. Mark the files read-only if you want to be sure they don't change. Compile errors coming from standard headers are caused by your code, not because the header is incorrect. Not with something as widely distributed as MinGW anyway.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I should close the thread simply for posting the entire OpenGL header. I think it is against the license listed in the header to display the code on a public forum. You do not need to post the header to fix the problems you are having. Header source removed.

  7. #7
    Registered User
    Join Date
    Apr 2011
    Posts
    37
    Thanks for all the help!!! I will not post the entire glut code again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 01:20 PM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. Errors, with vectors, windows programming... etc
    By bobbelPoP in forum C++ Programming
    Replies: 10
    Last Post: 07-27-2008, 03:07 AM
  4. Simple Windows program errors
    By Kespoosh in forum Windows Programming
    Replies: 2
    Last Post: 07-17-2004, 12:05 AM
  5. errors with opengl & glut in windows
    By korbitz in forum Game Programming
    Replies: 12
    Last Post: 03-14-2004, 01:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21