I installed MinGW and I just want to link my program into a single EXE file. I want to be able to give this EXE file to someone without having to worry about all the libgcc_s_dw2-1.dll, libstdc++-6.dll,or any other DLL. Is there a way to statically link all the required libraries into a single EXE?
I am developing on Windows 7.
You can use
-staticoption when linking with libraries, and for libgcc and libstdc++ use the following: