MinGW Link Single EXE

I installed MinGW and I just want to link my program with one EXE file. I want to provide this exe file to someone without worrying about all libgcc_s_dw2-1.dll, libstdc ++ - 6.dll or any other dll. Is there a way to statically link all the required libraries with one EXE?

I am developing Windows 7.

+5
source share
1 answer

You can use the option -staticwhen linking to libraries, and for libgcc and libstdC ++ use the following:

-static-libgcc -static-libstdc++ 
+6
source

All Articles