How can I compile native applications on my rooted phone?
I can't understand why I have to pay $3 for C4droid as it's just GCC with an editor.

Use the new free CppDroid - C/C++ IDE on Android. It has a lot of included C/C++ examples and tutorials. Blog link, Google Play link (needs 190 MB).