title: SDL2, Mac OS X, and OpenGL: How to avoid including both gl.h and gl3.h?
body: <p>I'm working on an SDL2 application using the OpenGL 3.2 core profile.  When I compile, I get the following warning:</p>
  
  <blockquote>
    <p>/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:5:2: warning:
    #warning gl.h and gl3.h are both included. Compiler will not invoke errors if using removed OpenGL functionality. [-Wcpp]</p>
  </blockquote>
  
  <p>I have to assume that SDL is including gl.h somewhere, because my only includes are as follows:</p>
  
  <pre><code>#define GL3_PROTOTYPES
  
  #include &lt;OpenGL/gl3.h&gt;
  #include &lt;SDL2/SDL.h&gt;
  </code></pre>
  
  <p>While I can simply ignore this, it has already led to one hard-to-find bug when I accidentally used an enum value not available in the core profile.  Is there some way to prevent gl.h from being included?</p>