Did you try searching the internet for this error message?

c++ - Invalid toolchain error with Code::Blocks - Stack Overflow
... uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]

@mods, sounds like this thread might be better suited for the tech forum.