Error: 'GL/glfw3.h: No such file or directory' when compiling C++ programs using OpenGL on Linux
<p>I receive the error message</p>

<pre><code>GL/glfw3.h: No such file or directory
</code></pre>

<p>when I try to compile the example program given in the tutorial <a href="http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/" rel="noreferrer">here</a>, section 'Opening a window'. I have installed all the libraries they referred to in the 'Building on Linux' section. (My distribution is Ubuntu 16.04.)</p>

<p>I have also successfully run</p>

<pre><code>apt-get install libglfw-dev
</code></pre>

<p>as I found suggested somewhere as an answer to this issue.</p>

<p>I think the glfw3 library has possibly been installed in a place that the compiler does not know how to automatically access.</p>

<p>How do I find out if this is the case, where should I put it so it can be accessed (<code>/usr/share</code>?), and what exactly do I put there? I've copied a file called <code>libglfw3.a</code> that I found in <code>/usr/local/lib</code> to <code>/usr/share</code>, but the error reoccurred.</p>

<p>I've tried compiling it using
<code>g++ first.c -o first</code>
and
<code>g++ first.c -lglut -lGL -lGLEW -lglfw -o first</code>. That error message alone occurred both times (which makes me think the other libraries don't even need to be linked?)</p>

<p>I'm a pretty new user. The solution is probably obvious.</p>