title: I am struggling to set up OpenGL and GLAD
body: <p>I am reading a book called learn OpenGL and I am struggling with the set up. I am using code blocks. What I have done so far is:
  I downloaded the 32 bit binaries for GLFW from this website: <a href="http://www.glfw.org/download.html" rel="nofollow noreferrer">http://www.glfw.org/download.html</a>
  I also downloaded GLAD from this website:
  <a href="http://glad.dav1d.de/" rel="nofollow noreferrer">http://glad.dav1d.de/</a> 
  I then added all the files from these downloads to an include folder. After this I added glad.c and glad.h to my project. Then in codeblocks I clicked the project tab then went to build options - search directories - compiler and added the 2 include folders that I got from the downloads and the src folder. Then in search directories I went to linker and added lib-mingw.</p>
  
  <p>The book I am reading told me to add this code:</p>
  
  <pre><code>#include &lt;GLFW/glfw3.h&gt;
  #include &lt;iostream&gt;
  int main()
  {
  //setting the version of openGL
  glfwInit();
  glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
  glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
  glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
  
  //creating a window
  GLFWwindow* window = glfwCreateWindow(800, 600, "LearnOpenGL", NULL, NULL);
  if (window = NULL)
  {
      std::cout &lt;&lt;"Failed to create GLFW window\n";
      glfwTerminate();
      return -1;
  }
  
  glfwMakeContextCurrent(window);
  
  if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
  {
  std::cout &lt;&lt; "Failed to initialize GLAD" &lt;&lt; std::endl;
  return -1;
  }
  
  glViewport(0, 0, 800, 600);
  
  return 0;
  }
  </code></pre>
  
  <p>My problem is I keep getting the error: 'GLADloadproc' was not declared in this scope and 'GLADLoadGLLoader' was not declared in this scope. Also I have tried putting the glad folder into my project file directory so that the <code>#include &lt;glad/glad.h&gt;</code> can be found. What could be the problem?</p>