Hello,
I am trying to add Glew to my XCode project, I am working on Lion. The problem is that since Apple has included OpenGL 2.1 functionality in their headers, I get the following errors when compiling with Glew in my project:
glew.h:
Conflicting declaration ‘typedef ptrdiff_t GLintptr’
Conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
Conflicting declaration ‘typedef unsigned int GLhandleARB’
Conflicting declaration ‘typedef ptrdiff_t GLintptrARB’
Conflicting declaration ‘typedef ptrdiff_t GLsizeiptrARB’
Conflicting declaration ‘typedef ptrdiff_t GLintptr’
Conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
Conflicting declaration ‘typedef unsigned int GLhandleARB’
Conflicting declaration ‘typedef ptrdiff_t GLintptrARB’
Conflicting declaration ‘typedef ptrdiff_t GLsizeiptrARB’
gltypes.h:
‘GLintptr’ has a previous declaration as ‘typedef long int GLintptr’
‘GLsizeiptr’ has a previous declaration as ‘typedef long int GLsizeiptr’
‘GLhandleARB’ has a previous declaration as ‘typedef void* GLhandleARB’
‘GLintptrARB’ has a previous declaration as ‘typedef long int GLintptrARB’
‘GLsizeiptrARB’ has a previous declaration as ‘typedef long int GLsizeiptrARB’
‘GLintptr’ has a previous declaration as ‘typedef long int GLintptr’
‘GLsizeiptr’ has a previous declaration as ‘typedef long int GLsizeiptr’
‘GLhandleARB’ has a previous declaration as ‘typedef void* GLhandleARB’
‘GLintptrARB’ has a previous declaration as ‘typedef long int GLintptrARB’
‘GLsizeiptrARB’ has a previous declaration as ‘typedef long int GLsizeiptrARB’
I know why this is happening, I just don’t know how to fix it. Aren’t we supposed to use Glew in OSX Lion like this?
I hope someone can help me here, thanks a lot in advance