title: Enabling/disabling SAFESEH in VC11?
body: <p>I created a new solution for zlib 1.2.7, set it up as a static library, added the necessary headers and source files from <code>./zlib/contrib/minizip</code> and got it to compile just fine. I then linked it against libpng (also as a static lib), which also compiles fine. Then, I linked libpng to my graphics engine project (also a static library)... still no errors.</p>
  
  <p>But as soon as I link my main project to my graphics engine, I get several LNK2026 errors regarding <em>crc32.obj</em>, <em>deflate.obj</em>, <em>inflate.obj</em>, <em>d3dxplane.obj</em>, <em>d3dxvec4.obj</em> and other zlib/directx related modules. It's telling me that they are coming from my graphics engine lib, so I've decided to fix this by adding <code>/SAFESEH:NO</code> to my linker flags for the corresponding projects.<br/>
  <strong>NOTE: I should probably state that all projects are set to target x86, NOT x64.</strong></p>
  
  <p>The problem, however, is now I'm getting:<br/>
  <code>warning LNK4044: unrecognized option '/SAFESEH'; ignored</code> which results in the same LINK2026 errors in my main project.<br/>
  If I open up a visual studio command prompt and type <code>LINK /?</code> it confirms that <code>/SAFESEH</code> is a valid linker option. I get the same error when I use <code>/SAFESEH</code> <em>(without the ':NO')</em>, and if I omit it entirely then my main project simply refuses build.</p>
  
  <p>What's going on here? How do I get around this?</p>