I have installed Xcode from the Tool cd, I thought that would let me use gcc from the command line but I can't find it.
What am I missing
EDIT
When I wrote I can't find it I meant "I look for it using which gcc
"
If gcc
would have been in the PATH
in first place, which
would have find it.
Since gcc
is not in the PATH
( that's what brought me here in first place ) which
won't find it!
I think that was obvious but I'm making the note here because it wasn't
The gcc application will be installed by default in /usr/local/bin.
You need to use the which command to locate c compiler binary called gcc. Usually, it is installed in /usr/bin directory.
Often times, you need c or gcc compiler to compile open source projects in Mac OS X. The problem is Mac OS X doesn't install the gcc compiler by default.
In the Command Prompt window type “gcc” and hit enter. If the output says something like “gcc: fatal error: no input files”, that is good, and you pass the test.
As of version 4.3.1, XCode is now an application and the command line tools are now available through the Preferences (this is documented in the App Store for XCode under 'What's New in Version 4.3.1' if you click 'More...'). After installing XCode, open it, open the Preferences and click on the Download tab. Click on 'install' for the 'Command Line Tools' and then sign in with your computer's password. The code will then be downloaded and installed.
Is it possible that rather than not having gcc installed, your $PATH variable is messed up? first check if gcc is in /usr/bin manually. Then echo $PATH...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With