On Feb 1, 2014, at 11:56 AM, Pax <45rpmli...@googlemail.com> 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 gpar...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com