• Forum
  • Lounge
  • undefined reference to `__gxx_personalit

 
undefined reference to `__gxx_personality_v0'

Sep 12, 2013 at 11:28pm
Everything on the internet everywhere says that the error is caused by linking with gcc instead of g++, however I can prove I am linking with g++ AND that -lstdc++ is even in the command line:
https://gist.github.com/LB--/6545149

Any idea what is causing this? The internet doesn't seem to have had this problem before.

(If you're looking for the code, it's here: https://github.com/LB--/ChessPlusPlus )
Last edited on Sep 12, 2013 at 11:28pm
Sep 13, 2013 at 12:40am
closed account (1yR4jE8b)
On Windows? I've noticed this happens when trying to link code that uses DW2 stack unwinding semantics with an SLJL semantics version of g++.
Sep 13, 2013 at 1:10am
I have no idea what that means ;)
Sep 13, 2013 at 1:15am
Sep 13, 2013 at 1:33am
Yes, I saw that, but I still don't know how to use that knowledge to fix this. I'm also confused about what the second linker error means.

I can compile other programs with exception handling just fine, I'm not sure why ChessPlusPlus specifically gives these linker errors.
Sep 13, 2013 at 2:22am
The problem is that dw2 and sjlj exception handling are not compatible. But you are trying to compile with one of each library.

Go to your C:\MinGW\bin directory and find the libgcc_s_*-1.dll file. It will tell you whether your MinGW installation was compiled with dw2 or sjlj.

Now whatever library it is you are trying to link in your program is compiled with the other. So the linker is barfing at you for trying to mix them.

Your options are, unfortunately, fairly limited:

1) Install the other exception handling version of MinGW. (A good option -- you can install two versions of MinGW on the system at the same time, just as long as you don't mix them together.)

2) Get the matching version of the external library you are using from their website. Or download and compile the library. If you can't do either of these things, you'll have to go with option 1.
Sep 13, 2013 at 3:08am
Duoas, there are no such libgcc_s_*-1.dll files anywhere on my system. I'm using nuwen MinGW. All the libraries and MinGW should have been compiled together "of the same, by the same, for the same".
Last edited on Sep 13, 2013 at 3:09am
Sep 13, 2013 at 3:19am
Ah, then you are probably out of luck. The 64-bit MinGW cannot use the dw2 and has some fudges for exception handling anyway. I don't know what stuff Lavavej has done to MinGW, but I suspect it is the source of the problem.

You might want to email him and ask about the error. At the very least, he can probably give you the technical information you need to compile the offending library with the same options he used when compiling everything.

Good luck!
Sep 13, 2013 at 4:17am
All the libraries and MinGW should have been compiled together "of the same, by the same, for the same".
So SFML and boost were built with Nuwen's MinGW?
Sep 13, 2013 at 4:25am
Boost comes with nuwen MinGW, SFML does not but builds easily.
Topic archived. No new replies allowed.