Error lnk2026: module unsafe for safeseh image

Hoai Dam picture Hoai Dam · Feb 5, 2013 · Viewed 79.1k times · Source

I got this error when building a sample visual C++ project. First I downloaded 3 sample projects, all solve the same problem, print out all the prime numbers less than N (you may know these sample projects ?). I built the pure-C project without any problem. But when I tried to build the assembly-based project one, I got this error.

Thank you.

Answer

kungfooman picture kungfooman · Mar 13, 2014

In Visual Studio 2012 Express Edition:

Right-click on your project ->
Properties -> 
Configuration Properties ->
Linker ->
Advanced and changed "Image Has Safe Exception Handlers" to "No (/SAFESEH:NO)"