That error usually shows up if either:
1) The path to the executable is not in the exported path
2) The software hasn't been installed.
Just out of curiosity, have you installed g++, or the xcode developer pack? AFAIK, installing OSX by itself doesn't install the compilers. I think a version of XCode may be on the OSX disc that you can install, but you might as well get the most current version from apple and register as a developer. It's free and once properly installed, you should have no problems.