MinGW SEH和MinGW SJLJ有什么区别? [英] What is the difference between MinGW SEH and MinGW SJLJ?

查看:407
本文介绍了MinGW SEH和MinGW SJLJ有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我才刚刚开始学习C并立即安装QT x64(在此处形成表格: http://tver-soft.org/qt64 ).我有两个安装选项: MinGW 4.9.2 SEH MinGW 4.9.2 SJLJ .
问题:哪个安装更好,为什么安装?

I am just starting to learn C and installing now QT x64 (form here: http://tver-soft.org/qt64). I have two options to install: MinGW 4.9.2 SEH or MinGW 4.9.2 SJLJ.
Question: Which is better to install and why?

我阅读了 sjlj与矮人还是其他人? https://wiki.qt.io/MinGW-64-bit#Exception_handling:_SJLJ.2C_DWARF.2C_and_SEH 但一无所知(C和Compiller语言的新手).

I read What is difference between sjlj vs dwarf vs seh? and https://wiki.qt.io/MinGW-64-bit#Exception_handling:_SJLJ.2C_DWARF.2C_and_SEH but understand nothing (new to C and compiller languages).

推荐答案

SJLJ和SEH是两个不同的异常处理系统.

SJLJ and SEH are two different exception handling systems.

对于特定的差异,您已经看到的资源涵盖了所有内容.

For the specific differences, the resources you've already seen cover everything.

但是,关于哪个安装更好的 ,请使用 SJLJ 进行安装,除非您知道需要SEH.

However, as for which one is better to install, go with SJLJ unless you know that you need SEH.

2019更新:在现代系统上,没有理由使用SJLJ,因此上面的建议可能应该翻转.SEH现在更加普遍.最终,这并不重要,因为在两者之间切换很容易.

2019 Update: On modern systems, there's no reason to use SJLJ, so the advice above should probably be flipped. SEH is more common now. Ultimately though, it doesn't really matter, since it's easy to switch between the two.

SJLJ在各种体系结构中得到了更广泛的支持,并且功能更强大.另外,可以通过使用其他异常处理系统的 库(包括C库)引发SJLJ异常.但是,它会降低性能.

SJLJ is more widely supported across architectures, and is more robust. Also, SJLJ exceptions can be thrown through libraries that use other exception handling systems, including C libraries. However, it has a performance penalty.

SEH效率更高(没有性能损失),但是不幸的是,它没有得到很好的支持.在不使用SEH的库中抛出SEH异常时,也会导致不良后果.

SEH is much more efficient (no performance penalty), but unfortunately is not well-supported. SEH exceptions will cause bad things to happen when thrown through libraries that do not also use SEH.

就您的代码而言,没有真正的区别.如果需要,您以后总是可以切换编译器.

As far as your code is concerned, there are no real differences. You can always switch compilers later if you need to.

这篇关于MinGW SEH和MinGW SJLJ有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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