Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add /EHa to QtCreator that used Microsoft Visual C++ Compiler

How can I add /EHa (Structured Exception Handling) in QtCreator for MS Compiler. I’ve been used Microsoft Visual C++ Compiler.

like image 1000
Harry Fox Avatar asked Jun 30 '12 19:06

Harry Fox


1 Answers

This is how to do it. Works both for Qt 4 and Qt 5. This will set EHa instead of default EHsc:

win* {
   QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
   QMAKE_CXXFLAGS_STL_ON = /EHa
}
like image 164
Violet Giraffe Avatar answered Oct 20 '22 13:10

Violet Giraffe