I just went through writing a fairly lengthly application in c++ using mingw and I went to give it to a few friends to try it out. When they went to execute the .exe file it came up with an error that says:
The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem
This error occurs with the debug version. Compiling with the release version comes up with the same error except "libgcc_s_dw2" is replaced with "libstdc++-6".
I was able to fix this issue by including the .dll's with the .exe but I would rather it be standalone for when I decide to release it to more of a general audience.
I have found this question asked a lot but all of them say to add -static-libstdc++ to the linker options.
I am using CodeBlocks and went to build options and put it in the same location I linked MinGW with. This didn't work, so I tried the other box next to it for additional options but that didn't work either.
I know it's probably a simple thing that I'm missing but I can't think of anywhere to put it.
I appreciate any help and thanks in advance.