The problem concerns your gcc. Either you do not have gcc at all (if you can compile as a root, then you have gcc) or access rights to your gcc do not allow you a user access.
(1) check access rights of files concerning gcc.
(2) check access rights of directories that "leads" to gcc.
You need 'r' and 'x' everywhere. You can see your progress by attempting compiling counter.c from the commandline. When you reach success, try Code Blocks again.