title: Using GCC (MinGW) to compile OpenGL on Windows
body: <p>I've searched on google and haven't been able to come up with a solution.</p>
  
  <p>I would like to compile some OpenGL programming using GCC.  In the GL folder in GCC I have the following headers:</p>
  
  <pre><code>gl.h
  glext.h
  glu.h
  </code></pre>
  
  <p>Then in my system32 file I have the following .dll</p>
  
  <pre><code>opengl32.dll
  glu32.dll
  glut32.dll
  </code></pre>
  
  <p>If I wanted to write a simple OpenGL "Hello World" and link and compile with GCC, what is the correct process?</p>
  
  <p>I'm attempting to use this code:</p>
  
  <pre><code>#include &lt;GL/gl.h&gt;
  #include &lt;GL/glut.h&gt;
  
  void display() {
      glClear(GL_COLOR_BUFFER_BIT);
      glFlush();
  }
  int main(int argc, char **argv) {
      glutInit(&amp;argc, argv);
      glutInitWindowSize(512,512);
      glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
      glutCreateWindow("The glut hello world program");
      glutDisplayFunc(display);
      glClearColor(0.0, 0.0, 0.0, 1.0);
      glutMainLoop(); // Infinite event loop
      return 0;
   }
  </code></pre>
  
  <p>I am using WindowsXP and GCC version 3.4.5. Thank you in advance for the help.</p>