title: Linking OpenGL using MinGW on Windows x86_64
body: <p>I would like to develope an application using C++ and OpenGL for Windows 64bit. 
  I am using the following Compiler <code>x86_64-w64-mingw32-g++</code>.</p>
  
  <p>The following code snippet (<code>Test.cpp</code>) is sufficient to trigger the error I get:</p>
  
  <pre><code>#include &lt;GL/gl.h&gt;
  
  int main(int argn, char **argv) {
      glClear(GL_COLOR_BUFFER_BIT);
  }
  </code></pre>
  
  <p>(I know this code is meaningless, but it is sufficient to trigger the error during linking.)</p>
  
  <p>I use the following Makefile:</p>
  
  <pre><code>Test:
      g++ -lopengl32 -o Test Test.cpp
  </code></pre>
  
  <p>This yields the following error:</p>
  
  <pre><code>undefined reference to `__imp_glClear'
  </code></pre>
  
  <p>I have no clue what I am missing, and would be very thankfull for any advice.</p>