title: Linking g++ with opengl (glm, glew and freeglut)
body: <p>This is the c++ code I want to run on my computer: <a href="http://pastebin.com/66BEyTWK">http://pastebin.com/66BEyTWK</a></p>
  
  <p>On the university computer, this code displays a white square. But when I try to run it on my computer all I get is a blank screen.</p>
  
  <p>I read on the opengl faq that the problem might be that I am linking with the wrong combination of opengl libraries.</p>
  
  <p>The include part of the code suggests that I need to link glm, glew and freeglut. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/freeglut.h&gt;
  #include &lt;glm/glm.hpp&gt;
  </code></pre>
  
  <p>I read that it is not necessary to link glm, because it is only a header file. So this is the compile statement I came up with:</p>
  
  <pre><code>g++ -o main white_square.cpp -lGL -lglut -lGLEW
  </code></pre>
  
  <p>At my university they have setup a custom makefile which I can't get much sense out of: <a href="http://pastebin.com/3DxST3Xs">http://pastebin.com/3DxST3Xs</a></p>