You didn't specify what the error you're seeing is.
Is the problem that gcc
is giving you an error, or that you can't run gcc
at all?
If it's the latter, the most likely explanation is that you didn't check "UNIX Development Support" when you installed the development tools, so the command-line executables aren't installed in your path. Re-install the development tools, and make sure to click "customize" and check that box.