• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quartz problem (glext bug)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quartz problem (glext bug)


  • Subject: Re: Quartz problem (glext bug)
  • From: Pax <email@hidden>
  • Date: Sat, 01 Feb 2014 21:34:06 +0000

Damn Google!  Always with the wrong answer ;-)

Thanks for this.  With your sage advice, I've located the problem.

On 1 Feb 2014, at 20:30, Greg Parker <email@hidden> wrote:

> On Feb 1, 2014, at 11:56 AM, Pax <email@hidden> wrote:
>> I've got a problem when I include the Quartz framework.  Doing so, without altering a single line of my code, causes the following error to be raised when I attempt to compile:
>>
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3382:45: Expected ')'
>>
>> I've done some digging around, and I understand that the problem is caused by a bug in glext - namely that 'it has a bunch of definitions that useGLenum, but GLenum isn't defined anywhere in that file. So, before you include glext.h, you need to include a file that defines GLenum.'  Given that I'm not directly including this file, it is being included from the Quartz framework, how can I fix this problem?
>
> That doesn't sound right. glext.h includes gltypes.h, which defines GLenum.
>
> My guess is that you have a #define elsewhere in your code that interferes with the declarations in glext.h. If you have a #define that happens to have the same name as one of glext's parameter names then the #define could introduce a syntax error into glext's code.
>
> You can use Xcode's Preprocess command to look at the code after #defines have been applied. If the problem is a wayward #define then you may be able to see it there. (Find the code on line 3382 of glext.h. Product > Perform Action > Preprocess File with one of your files that causes the error. Find that same code in the preprocessor output; it'll be on a different line. Look at that line and the lines around it for syntax errors.)
>
> In my copy of glext.h, line 3382 is the declaration of function glObjectPurgeableAPPLE, and column 45 is the 'o' in parameter 'GLenum objectType'. If your code has something like `#define objectType 42` before you include that file then you'll get the error described. Some versions of clang will tell you that there's a macro involved:
>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3382:45: error:
>      expected ')'
> extern GLenum glObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLe...
>                                            ^
> test.c:1:20: note: expanded from macro 'objectType'
> #define objectType 42
>                   ^
>
>
> --
> Greg Parker      email@hidden     Runtime Wrangler
>
>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Quartz problem (glext bug) (From: Pax <email@hidden>)
 >Re: Quartz problem (glext bug) (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Quartz problem (glext bug)
  • Next by Date: IKImageBrowser problem - mimic Safari "Top Sites"
  • Previous by thread: Re: Quartz problem (glext bug)
  • Next by thread: IKImageBrowser problem - mimic Safari "Top Sites"
  • Index(es):
    • Date
    • Thread