Dynamic link to the MinGW runtime
I read somewhere that MinGW statically links the c/c++ runtime. How can I dynamically link them to reduce the executable size? I don't need to worry about the dependency issue, as the final program will run on a Linux box. I am just doing a proof-of-concept prototype on windows, and need to 开发者_JS百科show that the produced executable is very small.
Link with -shared-libgcc, as usual. However, beware that the standard Debian mingw is built without shared libgcc support (though we have a version in our repository where I enabled that).
精彩评论