Does anybody know how to switch off exception handling option in MSVC? I tried to set the option 'Enable C++ exceptions' to 'NO' and I got warning:
warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
.
I would like to switch off the exception handler, too, but I don't know how.
In my application I basically need more speed than stability, therefore I chose switching off the exception handling. I do not have any try
/catch
blocks, but I do use STL. When I switch the option 'Enable C++ exceptions' to 'NO' is there any way how to get rid of those warnings?
Most likely you're including one or more standard C++ headers that contain try/catch. The most typical case would be <iostream>
- you will get this error on a file which consists of a single line that just includes that. Any other stream header will also do, as will locales.
If you look closely at the error message, it should reference two filenames, not one - your file, and the included file with the error. E.g. in my sample case of #include <iostream>
, I get this:
except.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With