Undefined reference to _Unwind_Resume and __gxx_personality_v0

后端 未结 3 2130
忘掉有多难
忘掉有多难 2020-12-03 14:32

I\'m trying to use the JsonCpp library. I\'m on Windows, using MinGW and CodeBlocks.

When I include anything from the json headers, my linker implodes and gives out

3条回答
  •  余生分开走
    2020-12-03 15:24

    For those coming to this from google (like i did), the real cause of the undefined references to _Unwind_Resume and __gxx_personality_v0 is "using a gcc that uses a different stack unwinding method than dwarf2" [1]

    In my case it was attempting to link code compiled with GCC 4.9 upwards with a library compiled with GCC 4.8 or below. The solution is to recompile the library with the same compiler you're building with.

提交回复
热议问题