Where is gcc on OSX? I have installed Xcode already

前端 未结 8 1551
醉酒成梦
醉酒成梦 2020-12-20 13:08

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

相关标签:
8条回答
  • 2020-12-20 13:44

    Xcode 4.3+ you need to install 'Command Line Tools for Xcode' found here: https://developer.apple.com/downloads

    0 讨论(0)
  • 2020-12-20 13:48

    Yes, try to install 'command line tools' by clicking Preferences-Downloads-command line tools.

    0 讨论(0)
  • 2020-12-20 13:53

    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.

    0 讨论(0)
  • 2020-12-20 13:53

    On my Mac $ which gcc displays /usr/bin/gcc.

    0 讨论(0)
  • 2020-12-20 14:01

    The same thing happened to me. It worked for a while and then went away. Reinstall and it will be fixed.

    You might want to download Xcode from Apple while you are at it. Almost guaranteed to be fresher / more up-to-date since Xcode is rapidly updated. Current Xcode is 3.2.1.10. You need an Apple ID to download, but that also gives you access to the development site. All free... .


    It is 1/6/2014. Current Xcode is 5.0.1


    It is 2016 -- Current Xcode is 8.0. I think this question should be closed now.

    0 讨论(0)
  • 2020-12-20 14:03

    You didn't check the box that says "UNIX Development Support"[1] (or possibly you unchecked it; I can't remember if it's on by default or not) when you did the install, so it didn't install the necessary symlinks and drivers in /usr/bin/.

    Reinstall, and make sure to read the descriptions of the configuration options and select the ones that you need.

    1: "Optional content to allow command-line development from the boot volume. Installs a duplicate of the GCC compiler and command line tools blah blah blah..."

    0 讨论(0)
提交回复
热议问题