1. <small id='S6E4M'></small><noframes id='S6E4M'>

    1. <i id='S6E4M'><tr id='S6E4M'><dt id='S6E4M'><q id='S6E4M'><span id='S6E4M'><b id='S6E4M'><form id='S6E4M'><ins id='S6E4M'></ins><ul id='S6E4M'></ul><sub id='S6E4M'></sub></form><legend id='S6E4M'></legend><bdo id='S6E4M'><pre id='S6E4M'><center id='S6E4M'></center></pre></bdo></b><th id='S6E4M'></th></span></q></dt></tr></i><div id='S6E4M'><tfoot id='S6E4M'></tfoot><dl id='S6E4M'><fieldset id='S6E4M'></fieldset></dl></div>
    2. <tfoot id='S6E4M'></tfoot>

        <bdo id='S6E4M'></bdo><ul id='S6E4M'></ul>

    3. <legend id='S6E4M'><style id='S6E4M'><dir id='S6E4M'><q id='S6E4M'></q></dir></style></legend>

      对 `__gxx_personality_sj0` 的未定义引用

      时间:2023-09-19

    4. <i id='51G1G'><tr id='51G1G'><dt id='51G1G'><q id='51G1G'><span id='51G1G'><b id='51G1G'><form id='51G1G'><ins id='51G1G'></ins><ul id='51G1G'></ul><sub id='51G1G'></sub></form><legend id='51G1G'></legend><bdo id='51G1G'><pre id='51G1G'><center id='51G1G'></center></pre></bdo></b><th id='51G1G'></th></span></q></dt></tr></i><div id='51G1G'><tfoot id='51G1G'></tfoot><dl id='51G1G'><fieldset id='51G1G'></fieldset></dl></div>

      • <small id='51G1G'></small><noframes id='51G1G'>

            <bdo id='51G1G'></bdo><ul id='51G1G'></ul>
            <legend id='51G1G'><style id='51G1G'><dir id='51G1G'><q id='51G1G'></q></dir></style></legend>

              <tfoot id='51G1G'></tfoot>
                <tbody id='51G1G'></tbody>
              1. 本文介绍了对 `__gxx_personality_sj0` 的未定义引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                使用 gcc 4.6 尝试执行此代码时:

                With gcc 4.6 when trying to execute this code:

                   #include <iostream>
                
                using namespace std;
                
                #include <bitset>
                
                int main()
                {
                   //Int<> a;
                   long long min = std::numeric_limits<int>::min();
                   unsigned long long max = std::numeric_limits<int>::max();
                   cout << "min: " << min << '
                ';
                   cout << "max: " << max << '
                ';
                   cout << (min <= max);
                   std::bitset<64> minimal(min);
                   cout << "minimal: " << minimal;
                
                   return 0;
                }
                

                我收到以下错误:
                1.对__gxx_personality_sj
                的未定义引用2.对_Unwind_SjLj_Register
                的未定义引用3.对_Unwind_SjLj_Unregister
                的未定义引用4.对_Unwind_SjLj_Resume

                到底是怎么回事?!

                推荐答案

                这些函数是 GCC 的 C++ 异常处理支持的一部分.GCC 支持两种异常处理,一种基于调用 setjmp 和 longjmp(sjlj 异常处理),另一种基于 DWARF 调试信息格式(DW2 异常处理).

                These functions are part of the C++ exception handling support for GCC. GCC supports two kinds of exception handling, one which is based on calls to setjmp and longjmp (sjlj exception handling), and another which is based on the DWARF debugging info format (DW2 exception handling).

                如果您尝试在单个可执行文件中混合使用不同异常处理实现编译的对象,则会发生这些类型的链接器错误.您似乎使用的是 DW2 GCC,但您尝试使用的某些库是使用 sjlj 版本的 GCC 编译的,从而导致了这些错误.

                These sorts of linker errors will occur is you try to mix objects that were compiled with different exception handling implementations in a single executable. It appears that you are using a DW2 GCC, but some library that you are attempting to use was compiled with a sjlj version of GCC, leading to these errors.

                简而言之,这类问题是由不同编译器之间的 ABI 不兼容引起的,因此当您混合使用不同编译器编译的库或使用同一编译器的不兼容版本时,就会发生此类问题.

                The short answer is that these sorts of problems are caused by ABI incompatibilities between different compilers, and so occur when you mix libraries compiled with different compilers, or use incompatible versions of the same compiler.

                这篇关于对 `__gxx_personality_sj0` 的未定义引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:这是 C++11 正则表达式错误我还是编译器? 下一篇:constexpr 使用静态函数初始化静态成员

                相关文章

                最新文章

                1. <legend id='9pTqy'><style id='9pTqy'><dir id='9pTqy'><q id='9pTqy'></q></dir></style></legend>
                  <i id='9pTqy'><tr id='9pTqy'><dt id='9pTqy'><q id='9pTqy'><span id='9pTqy'><b id='9pTqy'><form id='9pTqy'><ins id='9pTqy'></ins><ul id='9pTqy'></ul><sub id='9pTqy'></sub></form><legend id='9pTqy'></legend><bdo id='9pTqy'><pre id='9pTqy'><center id='9pTqy'></center></pre></bdo></b><th id='9pTqy'></th></span></q></dt></tr></i><div id='9pTqy'><tfoot id='9pTqy'></tfoot><dl id='9pTqy'><fieldset id='9pTqy'></fieldset></dl></div>

                  <small id='9pTqy'></small><noframes id='9pTqy'>

                    <bdo id='9pTqy'></bdo><ul id='9pTqy'></ul>

                  <tfoot id='9pTqy'></tfoot>