title: #include <glad/glad.h>: No such file or directory (even though source and header are in the same directory)
body: <p>I recently started converting a game engine I wrote in Java (using lwjgl) to C/C++. I am using Qt Creator and CMake on Fedora 25 (I'm pretty sure this doesn't affect anything) to link all the directories, files, etc. GLFW is installed on my system, but I decided to use the source version, rather than the included version. I am using glad for my extension loader, and configured it following the tutorial on the <a href="http://www.glfw.org/docs/latest/context_guide.html#context_glext_auto" rel="nofollow noreferrer">GLFW website</a>. I haven't gotten past the "Hello World" test because when I include the <code>glad.h</code> file in my <code>main.c</code> file, I get an error:</p>
  
  <p><code>&lt;glad/glad.h&gt;: No such file or directory</code></p>
  
  <p>What is equally strange is that I get this same error in the <code>glad.c</code> file, the one that was created using glad's own generator. My <code>main.c</code> file looks like this</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;glad/glad.h&gt;
  #include &lt;GLFW/glfw3.h&gt;
  
  int main(int argc, char *argv[])
  {
      printf("Kick Ass Game Engine");
      return 0;
  }
  </code></pre>
  
  <p>I have also tried using <code>"glad.h:</code> instead of <code>&lt;glad/glad.h&gt;</code> (I found that suggestion <a href="https://stackoverflow.com/questions/29019881/includeapis-api1-api-h-throws-no-such-file-or-directory">here</a>). This did work for my <code>main.c</code> file, but I still have the same issue with the <code>glad.c</code> file, even after I edited it to reflect <code>main.c</code>.</p>
  
  <p>My project directory looks like this:</p>
  
  <pre><code>- KAGE/
    -&gt; CMakeLists.txt
    -&gt; glad.c
    -&gt; glad.h
    -&gt; main.c
    -&gt; khplatform.h
  -&gt; KAGE/lib/
     -&gt; glad
     -&gt; glfw-3.2.1
  </code></pre>
  
  <p>As you can see, all of my <code>.c</code> and their header files are in one directory. The <code>lib</code> directory is where I keep glad and glfw. I just copied the files from the <code>lib/glad</code> directory to the main project one.</p>
  
  <p>My <code>CMake</code> looks like this</p>
  
  <pre><code>project(KAGE)
  cmake_minimum_required(VERSION 2.8)
  aux_source_directory(. SRC_LIST)
  add_executable(${PROJECT_NAME} ${SRC_LIST})
  
  set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
  set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
  set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
  
  add_subdirectory(/home/brian/KAGE/lib/glfw-3.2.1)
  
  find_package(OpenGL REQUIRED)
  
  target_link_libraries(KAGE glfw)
  </code></pre>
  
  <p>I have tried searching around, but all of the issues people had where when trying to call libraries installed on the system. Mine are not installed. I have a separate directory (<code>lib</code>) where I keep everything I use. The only solution I found that came close to what I was looking for was the one about replacing <code>&lt;glad/glad.h&gt;</code> with <code>"glad.h"</code>. As I said earlier, this did not work. The tutorial on GLFW's website does not offer any other information or troubleshooting. </p>
  
  <p>Any help or suggestions is greatly appreciated. Thank you.</p>