QT 无法抓住异常

出处:https://stackoverflow.com/questions/40980171/qt5core-dll-crashing

I've found that enabling /EHa (Structured Exception Handling) on the compiler solves my problem, as I can then use my default exception handling code (try/catch).

Appending this to my .pro did it:

win* {
   QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
   QMAKE_CXXFLAGS_STL_ON = /EHa
}

 

Visual Studio 在 c++, code generation.

posted on 2019-01-23 16:37  liujx2019  阅读(1317)  评论(0编辑  收藏  举报

导航