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 -static
option when linking with libraries, and for libgcc and libstdc++ use the following:
-static-libgcc -static-libstdc++
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With