Xcode refuses to build one of my OpenCL projects but builds another one successfully
<p>I've got two projects in Xcode, both of them use OpenCL and <a href="https://www.khronos.org/registry/cl/api/1.2/cl.hpp" rel="noreferrer"><code>cl.hpp</code></a> - OpenCL wrappers for C++.</p>
<p>I'm on Mac OS 10.11.4, using clang-703.0.29 version 7.3.0 and the latest (and pretty bizarre) version of Xcode (Version 7.3 (7D175)).</p>
<p>The first project compiles and builds very well. The result of a build is a static library (<code>.a</code> file). The second one uses this library (I'm just copying &amp; pasting the lib and the headers into this project's directory). I'm also linking <code>OpenCL.framework</code> with this project.</p>
<p>The problem is, the second project doesn't build. It says:</p>
<blockquote>
<p>CGLTypes.h - Missing ',' between enumerators</p>
</blockquote>
<p>This error is on line 75:</p>
<pre><code>kCGLPFAStereo OPENGL_ENUM_DEPRECATED(10_0, 10_11)        =   6,
</code></pre>
<p>It is the only error I'm getting. This happens when <code>cl.hpp</code> includes <code>OpenCL/opencl.h</code> which includes <code>OpenCL/cl_gl_ext.h</code> with <code>#include &lt;OpenGL/CGLTypes.h&gt;</code> in it.</p>
<p>The Base SDK is set to Latest (OS X 10.11). Exactly the same problem has occurred <a href="https://github.com/arrayfire/forge/issues/73" rel="noreferrer">here</a>, but it has been resolved by an OS update. My Mac OS version is already the latest, so I can't do this.</p>
<p>To sum up, the problem is that two projects use the same version of OpenCL, are built on the same machine with the same settings, the same compiler, etc, but one of them doesn't compile.</p>
<p><strong>Edit:</strong> here's a link to the first project: <a href="https://github.com/ForceBru/Matrix" rel="noreferrer"><em>Matrix</em> on GitHub</a>. I'll try to add the second one as soon as possible. In fact, it's an ANN that uses <em>Matrix</em> to do operations with matrices. The only thing I do is I include <code>cl.hpp</code> and all the <code>.hpp</code>s from <em>Matrix</em>. I'm also trying to link with the <code>.a</code> <em>Matrix</em> library, but the build process doesn't even get to this phase.</p>
<p>What should I do to fix that?</p>