将/EHa 添加到使用 Microsoft Visual C++ Compiler 的 QtCreator [英] Add /EHa to QtCreator that used Microsoft Visual C++ Compiler

查看:43
本文介绍了将/EHa 添加到使用 Microsoft Visual C++ Compiler 的 QtCreator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 QtCreator for MS Compiler 中添加 /EHa(结构化异常处理).我一直在使用 Microsoft Visual C++ 编译器.

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

推荐答案

这是怎么做的.适用于 Qt 4 和 Qt 5.这将设置 EHa 而不是默认的 EHsc:

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
}

这篇关于将/EHa 添加到使用 Microsoft Visual C++ Compiler 的 QtCreator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆