Where is gcc on OSX? I have installed Xcode alread

2020-02-13 09:33发布

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

标签: xcode macos gcc
8条回答
贼婆χ
2楼-- · 2020-02-13 10:23

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..."

查看更多
The star\"
3楼-- · 2020-02-13 10:23

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

查看更多
登录 后发表回答