I have a problem compiling a project in my Macbook, is a GLEW and GLUT project, I had problems with GLUT before and I used the following code to fix it.
Code :
#ifdef __APPLE__
#include </usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h>
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
 
#else
#include <GL/glew.h>
#include <GL/glut.h>
#endif

Now im using GLEW (i have the 2.0.0 version) and when im trying to compile it gives me the next error message:

Code :
In file included from Browser/browser.cc:1:
In file included from ./mg.h:22:
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:84:2: error: 
      gl.h included before glew.h
#error gl.h included before glew.h
 ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:87:2: error: 
      glext.h included before glew.h
#error glext.h included before glew.h
 ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9093:17: error: 
      unknown type name 'PFNGLCOPYTEXSUBIMAGE3DPROC'; did you mean
      'PFNGLCOPYTEXSUBIMAGE3DEXTPROC'?
GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
                PFNGLCOPYTEXSUBIMAGE3DEXTPROC
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:4414:28: note: 
      'PFNGLCOPYTEXSUBIMAGE3DEXTPROC' declared here
typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target...
                           ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9094:17: error: 
      unknown type name 'PFNGLDRAWRANGEELEMENTSPROC'; did you mean
      'PFNGLDRAWRANGEELEMENTARRAYATIPROC'?
GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
                PFNGLDRAWRANGEELEMENTARRAYATIPROC
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:3669:28: note: 
      'PFNGLDRAWRANGEELEMENTARRAYATIPROC' declared here
typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mo...
                           ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9095:17: error: 
      unknown type name 'PFNGLTEXIMAGE3DPROC'; did you mean
      'PFNGLTEXIMAGE3DEXTPROC'?
GLEW_FUN_EXPORT PFNGLTEXIMAGE3DPROC __glewTexImage3D;
                ^~~~~~~~~~~~~~~~~~~
                PFNGLTEXIMAGE3DEXTPROC
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:5494:28: note: 
      'PFNGLTEXIMAGE3DEXTPROC' declared here
typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLin...
                           ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9096:17: error: 
      unknown type name 'PFNGLTEXSUBIMAGE3DPROC'; did you mean
      'PFNGLTEXSUBIMAGE3DEXTPROC'?
GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D;
                ^~~~~~~~~~~~~~~~~~~~~~
                PFNGLTEXSUBIMAGE3DEXTPROC
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:5417:28: note: 
      'PFNGLTEXSUBIMAGE3DEXTPROC' declared here
typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GL...
                           ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9098:17: error: 
      unknown type name 'PFNGLACTIVETEXTUREPROC'
GLEW_FUN_EXPORT PFNGLACTIVETEXTUREPROC __glewActiveTexture;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9099:17: error: 
      unknown type name 'PFNGLCLIENTACTIVETEXTUREPROC'
GLEW_FUN_EXPORT PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9100:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXIMAGE1DPROC'
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9101:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXIMAGE2DPROC'
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9102:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXIMAGE3DPROC'
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9103:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC'; did you mean
      'PFNGLCOPYTEXSUBIMAGE1DEXTPROC'?
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                PFNGLCOPYTEXSUBIMAGE1DEXTPROC
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:4412:28: note: 
      'PFNGLCOPYTEXSUBIMAGE1DEXTPROC' declared here
typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target...
                           ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9104:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC'
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9105:17: error: 
      unknown type name 'PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC'
GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9106:17: error: 
      unknown type name 'PFNGLGETCOMPRESSEDTEXIMAGEPROC'
GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9107:17: error: 
      unknown type name 'PFNGLLOADTRANSPOSEMATRIXDPROC'
GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9108:17: error: 
      unknown type name 'PFNGLLOADTRANSPOSEMATRIXFPROC'
GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9109:17: error: 
      unknown type name 'PFNGLMULTTRANSPOSEMATRIXDPROC'
GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd;
                ^
/usr/local/Cellar/glew/2.0.0/include/GL/Versions/A/Headers/glew.h:9110:17: error: 
      unknown type name 'PFNGLMULTTRANSPOSEMATRIXFPROC'
GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf;
                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [browser] Error 1

I don't know what do I have to do to fix this problem.