Getting compiler errors on Mac

I've installed the latest XCode, have Max OS X 10.7.4, and have tried both Code Blocks and Eclipse Juno, both give me errors when I try to compile a simple Hello World program. When creating a project, when I get to the part where it shows which toolchains I have, it only shows "GNU Autotools Toolchain", maybe this has something to do with it.