[SOLVED] Procedure Entry Point not found in libBox2D.dll

I am working on a game that can be compiled on my machine, and run on most windows machine as long as you provide the .dll's with it.
I have been trying to get it to compile on my friends computer

The libraries we are using are:
Box2D
SFML
TGUI
JSONCPP

(These are the same steps that I did on my computer):
A friend wanted to join me, so we downloaded the source for each lib on his machine.
Built each set of libraries using CMake, release-shared, and debug-shared.
Tried to compile the project.
It compiles, but when it tries to run it crashes with:

Code: Select all

The procedure entry point __gxx_personality_v0 could not be located in
the dynamic link library
(directory to the bin folder)\libBox2D.dll

I have seen this exact error before, but with libstdc++6, and that was due to not having the libstdc++6.dll built with the right exception model (DW2 vs SJLJ). Does anyone have any insight into why this would happen?

Other Details:
In C:\Program Files (x86)\CodeBlocks\MinGW\bin my computer has libgcc_s_dw2-2.dll AND libgcc_s_sjlj-1.dll, where as his computer only has libgcc_s_dw2-1.dll

On my computer, the program requires the extra libraries (ones not created by the 4 I listed):
libgcc_s_sjlj-1.dll
libstdc++-6.dll
libsndfile-1.dll
openal32.dll

1. If we don't include libgcc_s_sjlj-1.dll with the exe on his computer, the program crashes in one of the SFML.dll libraries (as indicated by the debugger).
2. If we try the libgcc_s_dw2-1.dll with the exe (instead of sjlj), the same crash happens as #1


We compiled and ran test code for Box2D and SFML separately. Both worked. So this isn't directly Box2D's or SFML's fault. Is there a way I can see which libraries are DW2 vs SJLJ? I'm confused as to how they could be different considering they were all built on his computer, but I was hoping to get some insight into how to fix this.
It turns out the friends C::B setup was referencing the wrong MinGW directory (for some reason)
We ended up using a new gcc compiler for both of us.

Original thread: https://box2d.org/forum/viewtopic.php?t=9932