出处: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.