title: Linking GLFW libraries error
body: <p>Well, im trying to get started with GLFW, but i am getting some troubles when i try to link the libraries.</p>
  
  <p>I'm trying to compile the first example of the GLFW page.</p>
  
  <pre><code>#include &lt;GLFW/glfw3.h&gt;
  
  int main(void)
  {
      GLFWwindow* window;
  
      /* Initialize the library */
      if (!glfwInit())
          return -1;
  
      /* Create a windowed mode window and its OpenGL context */
      window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
      if (!window)
      {
          glfwTerminate();
          return -1;
      }
  
      /* Make the window's context current */
      glfwMakeContextCurrent(window);
  
      /* Loop until the user closes the window */
      while (!glfwWindowShouldClose(window))
      {
          /* Render here */
          glClear(GL_COLOR_BUFFER_BIT);
  
          /* Swap front and back buffers */
          glfwSwapBuffers(window);
  
          /* Poll for and process events */
          glfwPollEvents();
      }
  
      glfwTerminate();
      return 0;
  }
  </code></pre>
  
  <p>Compiler </p>
  
  <pre><code>g++ -L. libglfw3dll.a -lglfw3 -lopengl32 main.cpp
  </code></pre>
  
  <p>In my project folder i have </p>
  
  <p>glfw3.dll</p>
  
  <p>libglfw3dll.a</p>
  
  <p>When i try to compile it, i get this linker error</p>
  
  <p>undefined reference to `__imp_glClear'</p>
  
  <p>What am i doing wrong?</p>
  
  <p>/<em>---------------------- Edit ----------------------------</em>/</p>
  
  <p>Sorry, i forgot to say some things, that could clarify a little bit my situation...</p>
  
  <p>I'm working on Windows 10, 64 bits.</p>
  
  <p>Compiler -> Mingw
  Binaries -> Downloaded from the official page </p>
  
  <p>I tried to compile the code with the static libraries and i got a lot of undefined references.</p>
  
  <pre><code>g++ -L. -lopengl32 -lglu32 -lgdi32 -lglfw3  main.cpp
  </code></pre>
  
  <p>Then, i tried to use the dynamic library, glfw.dll. I also linked the glfwdll.a library and defined the GLFW_DLL macro before including the headers.</p>
  
  <pre><code>g++ -L. libglfw3dll.a -lglfw3 -lopengl32 main.cpp
  </code></pre>
  
  <p>with the last option, i got just 1 undefined reference </p>
  
  <pre><code>undefined reference to `__imp_glClear'
  </code></pre>
  
  <p>I understand that this is from the opengl32 library.</p>
  
  <p>I also understand that I'm missing something that I can't find.</p>
  
  <p>Here I come again, can you give me a hand, and tell me what I'm missing?</p>
  
  <p>Thanks!</p>