Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

j4mie

macrumors newbie
Original poster
Oct 26, 2007
9
0
Brighton, UK
On Tiger, installing the Developer Tools was all you needed to do to use GCC at the command line. I installed Leopard today and the new version of the Developer Tools and now I get:

Code:
macbook:/ jamie$ gcc
-bash: gcc: command not found

I have a feeling this may be something to do with my $PATH variable, but I have no idea how to fix it.

Any thoughts?
 
Make sure that gcc is installed. It resides in /usr/bin in version 10.3 (sorry, have not upgraded from Panther). It may be installed somewhere else, though. Try 'whereis gcc'. Once you know where gcc is located, you can add the location to your $PATH, which you can alter in your .bashrc file (or .cshrc), for example. Just add a colon and the path you found.
 
Thanks, I actually solved this myself - turned out I'd unticked the option for command line tools in the installer. I mustn't have read the description properly. File this under "stupid questions" :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.