Can't use GCC in OS X Terminal

后端 未结 4 1615
广开言路
广开言路 2021-01-07 00:42

I have installed the developer tools. I can compile code via Xcode and according to the docs /usr/bin/gcc & /usr/bin/cc should point to /usr/bin/gcc-4.0. Neither the sym

相关标签:
4条回答
  • 2021-01-07 00:51

    Did you install the latest Xcode after installing Snow Leopard, or is this the version of Xcode from a previous OS installation?

    On my system with a clean Snow Leopard install the default compiler (and the one symlinked from cc and gcc) is gcc-4.2

    I do have gcc-4.0 too, although it's not the default.

    0 讨论(0)
  • 2021-01-07 00:53

    These binaries should be there after installing xcode. Check your path settings, and if you still don't have these reinstall xcode

    0 讨论(0)
  • 2021-01-07 00:54

    No! Reinstalling is the wrong answer!

    Newer versions of XCode require you to install the command-line versions of the tools separately. In XCode, go to Preferences | Downloads, check the Components tab, and install them from there:

    enter image description here

    0 讨论(0)
  • 2021-01-07 01:07

    Command line tools are no longer included with the latest XCode (even as an add on). Now you can download them here:

    https://developer.apple.com/downloads/index.action

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