It is difficult to answer when one does not understand the question.
Sarek, Star Trek: The Voyage Home
In other words, it may be helpful if you elaborate "nothing works" a bit more and give more detailled information about your system. A copy of your compiler's/linker's commandline and error messages might be helpful, too. Just "nothing works" is not an awful lot of information.
In general, the -static option does what you want in gcc/MinGW, on systems that do support it, and if the required libraries are found. It normally works without that flag, however, by selecting the correct library (a static one).
If you refer to one of glibc/glibc++/MinGW stub as "the runtime", this is always linked statically anyway.
If you refer to MSVCRT.DLL as "the runtime", then I am afraid this will not work, at least not without a lot of hacking and violating the law.
(EDIT: It's not necessary, anyway, since MSVCRT is/should be on every computer.)
hi thomas thanks for the answer.
my problem is, when i make a program with c::b and give it to a friend then always comes this error:
This application has failed to start because the application configuration is incorrect.
i heard i can solve this problem by using '-static', but the size of my app doesnt change if i use it.
because of this i think it doesnt work.
but if i enable the whole commandline output i can see this:
mingw32-g++.exe -Os -IC:\Programme\CodeBlocks\include -c main.cpp -o .objs\main.o
windres.exe -i icon.rc -J rc -o .objs\icon.res -O coff
mingw32-g++.exe -LC:\Programme\CodeBlocks\lib -o .\test\test.exe .objs\main.o .objs\icon.res -s -static
phen (please excuse my poor english)