title: SDL 2.0 with Code::Blocks
body: <p>Ever since I picked up SDL (which was not too long ago), I have used Code::Blocks with MinGW to develop... on Windows. Setting it up for SDL 1.2 was easy and quick.</p>
  
  <p>Now I want to start with OpenGL 3.2, and since I already know SDL, I thought using it for OpenGL would be logical. So I downloaded SDL 2.0, which supports OpenGL 3.x, and tried to build the libraries.</p>
  
  <p>I tried to <code>make install</code> with Cygwin, but it did not configure because I am on Windows. To get the .lib and .dll files, I followed the VisualC instructions and was able to generate them.</p>
  
  <p>But I was pretty sure I wouldn't be able to use the *.lib files with MinGW. I couldn't.</p>
  
  <p>So I tried to use reimp to convert the *.lib files to *.a. It did not work, all libraries were found to be "corrupt". Even glew32.lib which I downloaded and did not build myself. I am quite lost.</p>
  
  <p>Can I even get it to work with MinGW, or do I have to switch to VisualStudio? </p>
  
  <p>(I don't even know if VC++ 2010 Express Edition will be usable. The only reason I was able to build the VisualC libraries is because I used the Visual Studio Pro Trial. VC++ 2010 was not letting me do so earlier.)</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>I used MSYS to build the *.a and *.dll.a for both SDL 2.0 and GLEW. My project was linked properly and built without any problems. But, I am unable to run it.</p>
  
  <p>I get the error "The application was unable to start correctly (0xc00007b)". </p>
  
  <p>I know this problem is due to incorrect *.dll files. I have linked all the *.dll.a files I built, and I don't know why this problem is occurring.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>(<a href="http://pastebin.com/KqAR1PHi" rel="nofollow">Here</a> is the pastebin of the test program I wrote, but I doubt that the present problem is with the code.)</p>
  
  <p><strong>Update v2</strong>:</p>
  
  <p>I solved it. I just put the *.dll files into the System32 folder, as well as the SysWOW64 folder. </p>
  
  <p>Then, I just had to debug my code. Currently, you can't simply call <code>SDL_Init(SDL_INIT_EVERYTHING)</code> because there is no haptic support.</p>
  
  <p>Now that I've got my stuff working, I'll get to developing. Thanks for your help.</p>