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.
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.
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".
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.