title: How to construct default g++ include path on mac 10.8?
body: <p>This post: <a href="https://stackoverflow.com/questions/6715454/what-is-the-default-path-for-osx-system-include-files-when-building-a-c-applic">What is the default path for OSX system include files when building a C++ application?</a> gives me a command I can run to see what my default g++ include path is:</p>
  
  <pre><code>echo "" | gcc - -xc -v -E
  </code></pre>
  
  <p>When I run this, among other things, I get my default include path:</p>
  
  <pre><code>#include &lt;...&gt; search starts here:
  /Applications/gcc471/lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include
  /usr/local/include
  /Applications/gcc471/include
  /Applications/gcc471/lib/gcc/x86_64-apple-darwin12.0.0/4.7.1/include-fixed
  /usr/include
  /System/Library/Frameworks
  /Library/Frameworks
  </code></pre>
  
  <p>However, I have no idea how this path is constructed. How do I change the order of this default path? Note, this is not $PATH (I know how to do export $PATHs in my .profile). Checking /etc/paths led to a help file explaining how $PATH is actually constructed, but I want to know how this different include path (not sure if it has a system name like $INCLUDEPATH) is constructed, and how I can change its order. </p>