Glew and OpenGL on OSX Lion

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

you arent forced to use GLEW its a utility library that isnt part of OpenGL

Yes I know, but Lion’s opengl header exposes opengl 2 core functionality only I think, and I will need some extensions. On windows, I have glew working, but I just cannot fix the osx build.

I am using GLFW to initialize the window btw.