title: #include - brackets vs quotes in XCode?
body: <p>In MSVC++ #include files are searched for differently depending on whether the file is enclosed in "" or &lt;>. The quoted form searches first in the local folder, then in /I specified locations, The angle bracket form avoids the local folder.</p>
  
  <p>This means, in MSVC++, its possible to have header files with the same name as runtime and SDK headers.</p>
  
  <p>So, for example, I need to wrap up the windows sdk windows.h file to undefine some macro's that cause trouble. With MSVS I can just add a (optional) windows.h file to my project as long as I include it using the quoted form :-</p>
  
  <pre><code>// some .cpp file
  #include "windows.h" // will include my local windows.h file
  </code></pre>
  
  <p>And in my windows.h, I can pull in the real one using the angle bracket form:</p>
  
  <pre><code>// my windows.h
  #include &lt;windows.h&gt; // will load the real one
  #undef ConflictingSymbol
  </code></pre>
  
  <p>Trying this trick with GCC in XCode didn't work. angle bracket #includes in system header files in fact are finding my header files with similar names in my local folder structure.
  The MSVC system means its quite safe to have a "String.h" header file in my own folder structre. On XCode this seems to be a major no no.</p>
  
  <p>Is there some way to control this search path behaviour in XCode to be more like MSVC's? Or do I just have to avoid naming any of my headers anything that might possibly conflict with a system header. Writing cross platform code and using lots of frameworks means the possibility of incidental conflicts seems large.</p>