I've been trying to find a solution to this for a while now, and everywhere it's mentioned there is just a pile of answers saying something along the lines of "look it up" or "it's obvious". Well I'm telling you now that it's NOT obvious. I know it's probably simple but not all of us know where linux has put the compiler. Yes, it may be obvious that Code::blocks requires a compiler, but where that compiler might be is not.
I don't know about everyone else, but when I say that I can't get code::blocks to compile, I don't mean that I don't know how to click on "settings" and browse to a directory, I mean I don't know which directory to browse to, whether the compiler is installed, which compiler I should install and how I would go about doing that.
Instead of patronising everyone who asks this question, it might be helpful just to provide a solution that people can actually understand, then in future you can just link to that answer.