title: Compiler cannot find header file within header file in C++
body: <p>I have a header file provided by yaml-cpp library, yaml.h</p>
  <p>yaml.h:</p>
  <pre><code>#include &quot;yaml-cpp/parser.h&quot;
  #include &quot;yaml-cpp/emitter.h&quot;
  #include &quot;yaml-cpp/emitterstyle.h&quot;
  #include &quot;yaml-cpp/stlemitter.h&quot;
  #include &quot;yaml-cpp/exceptions.h&quot;
  
  #include &quot;yaml-cpp/node/node.h&quot;
  #include &quot;yaml-cpp/node/impl.h&quot;
  #include &quot;yaml-cpp/node/convert.h&quot;
  #include &quot;yaml-cpp/node/iterator.h&quot;
  #include &quot;yaml-cpp/node/detail/impl.h&quot;
  #include &quot;yaml-cpp/node/parse.h&quot;
  #include &quot;yaml-cpp/node/emit.h&quot;
  </code></pre>
  <p>main.cpp</p>
  <pre><code>#include &quot;./lib/yaml-cpp/include/yaml.h&quot;
  
  int main()
  {
      YAML::Node config = YAML::LoadFile(&quot;config.yaml&quot;);
      return 0;
      
  }
  </code></pre>
  <p>All the header files are in the same directory <code>(/home/user/application/libs/yaml-cpp/include)</code>, but the compiler is unable to find parser.h and all the other includes. Why is this so and how do I fix it?</p>
  <p>I have tried using <code>g++ -I/home/user/application/libs/yaml-cpp/include main.cpp</code> but that did not work.</p>
  <p>I am on a linux environment. Everything works fine when the header files are kept in /usr/lib64, but I am not allowed to do that for this project.</p>