title: Override default header search path
body: <p>I'm currently trying to get a program to compile on a system that I don't have control over.</p>
  
  <p>The problem that I'm having is the include directories look like this:</p>
  
  <pre><code>/usr/include:
  gmpxx.h gmp.h
  
  /usr/local/include:
  gmp.h
  </code></pre>
  
  <p>In my cpp file, I use</p>
  
  <pre><code>#include &lt;gmpxx.h&gt;
  </code></pre>
  
  <p>and this finds the correct file in <code>/usr/include</code>, however when gmpxx.h includes gmp.h, it pulls it from <code>/usr/local/include</code>, which breaks the build.</p>
  
  <p>Right now, I see 3 very ugly solutions to the problem</p>
  
  <ol>
  <li><p>In my cpp file, add <code>#include &lt;/usr/include/gmp.h&gt;</code><br>
  Having an absolute include path is pretty ugly and non-portable, and I think that this sort of thing should belong in the Makefile instead of the source.</p></li>
  <li><p>add the <code>-nostdinc</code> flag to my makefile, and specify the include paths by hand</p></li>
  <li><p>create local symlinks to the libraries that I really want, and then do local includes (<code>#include "gmp.h"</code>)</p></li>
  </ol>
  
  <p>Is there a better solution that I'm missing?</p>