error gxx_personality during runtime

Started by nurgle, 29 March 2014, 19:14:39

nurgle

Hello, i have troubles with tgui. I builded the library with cmake (release and debug). It was built fine. Then i linked these libraries into my project. The compilation was also succesfull, but when i executed my app i got a error message "The entry point in the procedure gxx_personality_v0 wasn't found in library DLL libstdc++-6.dll". My IDE is CodeBlocks 13.12 with mingw 4.7.1 (platform windows 7 x86).

texus

#1
Did you by any chance copy libstdc++-6.dll next to your executable? (I think I've seen this problem before when someone copied the wrong libstdc++-6.dll next to its program)

Do you have multiple MinGW compilers on your pc?

nurgle

QuoteDid you by any chance copy libstdc++-6.dll next to your executable? (I think I've seen this problem before when someone copied the wrong libstdc++-6.dll next to its program)

Yes, the dll is next to my executable. I took it from the folder of my compiler codeblocks

QuoteDo you have multiple MinGW compilers on your pc?
Yes, at least two compilers / IDE

texus

Then you might have the dll from the wrong MinGW version.

You should check which compiler is being used to compile tgui and your project.
In CMake check the 'Advanced' option and have a look at which compiler is being used.
Also have a look at you codeblocks settings and look at which compiler it uses.
These should be the same folder, and it has to be the folder from where you copied the libstdc++-6.dll from.

Also, what happens if you don't put that dll next to the exe?

nurgle

QuoteYou should check which compiler is being used to compile tgui and your project.
In CMake check the 'Advanced' option and have a look at which compiler is being used.
Also have a look at you codeblocks settings and look at which compiler it uses.
These should be the same folder, and it has to be the folder from where you copied the libstdc++-6.dll from.
I checked these options. For cmake the compiler is g++.exe and gcc.exe. The default compiler in CodeBlocks is mingw32-gcc.exe and mingw32-g++.exe. These compilers are in same folder.

QuoteAlso, what happens if you don't put that dll next to the exe?
I get the same error, but the procedure is gxx_personality_sj0

texus

QuoteI get the same error, but the procedure is gxx_personality_sj0
These kind of errors mean that the libraries aren't compatible with the compiler as far as I know.
But it seems like one part tries to use gxx_personality_v0 (dwarf2?) and another part gxx_personality_sj0 (sjlj?).

Did you compile sfml yourself as well (with the same compiler)?

Perhaps you can try with the tgui precompiled libraries. It also includes the sfml libraries, so you'll be sure that the libraries are compatible. And they has been tested with MinGW 4.7.1-TDM.

nurgle

QuoteDid you compile sfml yourself as well (with the same compiler)?
I use the libraries, downloaded from the official site. So, i must try to compile sfml with my compiler?

QuotePerhaps you can try with the tgui precompiled libraries. It also includes the sfml libraries, so you'll be sure that the libraries are compatible. And they has been tested with MinGW 4.7.1-TDM.
I tried to execute my app with the tgui precompiled libraries and with included sfml libraries, but the result is same as before. I noticed, that the app requires at once libgcc_s_dw2-1.dll and libgcc_s_sjlj-1.dll. How he can require two different libraries at once? I compiled the main app with one compiler.

texus

QuoteSo, i must try to compile sfml with my compiler?
You can try it. But if you really downloaded the SJLJ version and the compiler used by codeblocks is still the correct one then it isn't going to make a difference.

QuoteI noticed, that the app requires at once libgcc_s_dw2-1.dll and libgcc_s_sjlj-1.dll. How he can require two different libraries at once?
I never had this problem, so I can only guess. You have three things: the code that you compile yourself, the sfml libs and the tgui libs. I would except that one of these is compiled with the wrong compiler.

But I would expect linking errors when you are using a library that is compiled agains the wrong compiler version. So maybe the sfml and tgui dlls that you have next to your exe are wrong while the .a files are the right ones. You can also try static linking, if the problem is with the dlls then this will work.

Anyway, perhaps you should send me the full project (e.g. on dropbox), including the sfml and tgui libraries and dlls. That way I can try replacing some of these files with versions on my pc and perhaps discover where the mistake is.

nurgle

It works!!! I compiled sfml with my compiler. With my sfml libs it works fine. So, i build tgui and sfml with my compiler and linked to my project. Texus thx for help and this cool library!