Flags to use:
-s
like you’ve been doing to strip symbols-lstdc++_s
to specify dynamically linking against thelibstdc++.dll
-Os
to optimize the binary for size.
By default mingw static links to libstdc++.a
on Windows.
Note that the lstdc++_s
flag is only in MinGW with GCC > 4.4, I believe.