title: Application segmentation fault, only when compiling on Windows with MinGW
body: <p>I'm trying to compile <a href="http://github.com/SuperV1234/SSVOpenHexagon" rel="nofollow noreferrer">one of my games</a> on Windows, but unfortunately, no matter what, I'm getting this segmentation fault every time I run the program.</p>
  <p>Compilation is successful, and without any warning.</p>
  <blockquote>
  <p>Program received signal SIGSEGV, Segmentation fault.</p>
  <p>__chkstk_ms () at ../../../../../src/gcc-4.8.1/libgcc/config/i386/cygwin.S:172</p>
  <p>172     ../../../../../src/gcc-4.8.1/libgcc/config/i386/cygwin.S: No such file or directory.</p>
  </blockquote>
  <p>I've tried:</p>
  <ul>
  <li>Compiling on a Windows x86 machine</li>
  <li>Compiling on a Windows x64 machine</li>
  <li>nuwen.net's MinGW distro</li>
  <li>TDM MinGW 4.8.1 SJLJ</li>
  <li>MinGW builds x86 SJLJ</li>
  <li>MinGW builds x64 SJLJ</li>
  <li>MinGW builds x86 DW2</li>
  </ul>
  <p>I've built all dependencies from source multiple times, tried linking both statically and dynamically.</p>
  <p>Debugging doesn't help either - GDB gives me that error message just upon entering <code>main()</code>. I've used <code>-g3</code> and <code>-O0</code> flags.</p>
  <p>How can I figure out what's happening?</p>