The Maximize Speed ββ(/ O2) optimization setting is not compatible with the installation of Basic Runtime Checks to generate code.
To change the settings for basic runtime checks:
Solution β Properties β Configuration Properties β C / C ++ β Code Generation β Basic Execution Checks
Set to "Default" and it should work.

source share