title: How to use GLEW with Code::Blocks
body: <p>This seems to be a fairly common problem that I can't seem to find a <em>good</em> solution too. Most forums or questions I've read tell you what's wrong, but don't explain how to fix it very well.  I've bee trying to setup GLEW with Code::Blocks and I've not been able to get it to work for about two weeks now, so there isn't much I haven't tried. I keep hitting linker errors such as: </p>
  
  <pre><code>obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|57|undefined reference to `_imp____glewGenBuffers'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|59|undefined reference to `_imp____glewBindBuffer'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|61|undefined reference to `_imp____glewBufferData'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|63|undefined reference to `_imp____glewEnableVertexAttribArray'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|64|undefined reference to `_imp____glewBindBuffer'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|72|undefined reference to `_imp____glewVertexAttribPointer'|
  obj\Debug\src\Graphics.o:D:\cold-fusion-engine\ColdFusion\src\Graphics.cpp|77|undefined reference to `_imp____glewDisableVertexAttribArray'|
  ||=== Build finished: 7 errors, 0 warnings ===|
  </code></pre>
  
  <p>How my linker is setup:
  <img src="https://i.stack.imgur.com/P8Hc1.png" alt="enter image description here"></p>
  
  <p>One thing I've read that might be wrong is that GLEW needs to be compiled to glew32.a instead of glew32.lib but I can't get the Makefile to work with Cygwin. I've also noticed this seems to be a some what common problem people have. I know it's a lot to ask but could someone possibly compile GLEW for Mingw and upload it or give a <strong>detailed</strong> step by step on how to do it? I'm having way more trouble with this than I should and it's driving me to the point of giving up on learning OpenGL 4 and just sticking with OpenGL 1.2. </p>