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 (yo
Right-click on your project ->
Properties ->
Configuration Properties ->
Linker ->
Advanced and changed "Image Has Safe Exception Handlers" to "No (/SAFESEH:NO)"