title: Why am I getting an undefined reference in this code?
body: <p>I'm using Windows and I'm calling the function <code>glGenBuffers</code>. When I use it I get the following error:</p>
  
  <pre><code>error: undefined reference to _imp____glewBufferData
  </code></pre>
  
  <p>I'm linking against the <code>glew32</code> dll that is in my <code>MinGW/lib</code> folder, and I have <code>glew.h</code> inside <code>MinGW/include</code>. I also put the <code>glew32.dll</code> inside the <code>WINDOWS/system32</code> folder.</p>
  
  <p>I'm compiling like this:</p>
  
  <pre><code>mingw32-g++.exe ... -lglfw -lglfw3 -lopengl32 -lglew32 -lgdi32 -lglu32 -lglew32s
  </code></pre>
  
  <p>Is it the order of the libraries that's causing the problem? If so, what should come before the other?</p>