title: Why can't C++ find GLM headers?
body: <p>I do not have permissions to put GLM into usr/local/include or usr/include but I need to use GLM for openGL. The code (I am not able to change) looks for GLM like this:</p>
  
  <pre><code>#include &lt;glm/glm.hpp&gt;
  #include &lt;glm/gtc/matrix_transform.hpp&gt;
  #include &lt;glm/gtc/type_ptr.hpp&gt;
  </code></pre>
  
  <p>the folder glm is in the same directory as my main.cpp where this code is from. I think it's not working because it's looking for glm in usr/include where in built headers are (im using redhat linux)</p>
  
  <p>How can I stop this from happening, since I cannot run:</p>
  
  <pre><code> g++ main.cpp -lGL -lglut -lGLEW
  </code></pre>
  
  <p>without these errors:</p>
  
  <pre><code>main.cpp:46:23: error: glm/glm.hpp: No such file or directory
  main.cpp:47:40: error: glm/gtc/matrix_transform.hpp: No such file or directory
  main.cpp:48:32: error: glm/gtc/type_ptr.hpp: No such file or directory
  main.cpp:62: error: ‘glm’ has not been declared
  main.cpp:62: error: expected constructor, destructor, or type conversion before ‘cameraMatrix’
  main.cpp: In function ‘int setShaderData(const unsigned int&amp;)’:
  main.cpp:102: error: ‘glm’ has not been declared
  main.cpp:102: error: expected ‘;’ before ‘projection’
  main.cpp:105: error: ‘glm’ has not been declared
  main.cpp:105: error: ‘projection’ was not declared in this scope
  main.cpp:109: error: ‘glm’ has not been declared
  main.cpp:109: error: expected ‘;’ before ‘modelview’
  main.cpp: In function ‘void render()’:
  main.cpp:187: error: ‘cameraMatrix’ was not declared in this scope
  main.cpp:187: error: ‘glm’ has not been declared
  main.cpp:200: error: ‘glm’ has not been declared
  </code></pre>