user2344996
user2344996

Reputation: 1873

Installed XCode, but GCC doesn't work

I recently installed OSX Mavericks along with XCode 5.1.1. I also installed command line tools because I need to use GCC to compile some of my programs (since they won't compile correctly with clang). When I went to the command line, I typed in 'gcc' and was greeted with this message:

            clang: error: no input files

I have tried several installs of command line tools and even a reinstall of Xcode itself, but the 'gcc' command still points to clang. Is there any way that I can get gcc installed on OSX Mavericks?

EDIT: I have tried to install gcc from source and I have also used a package manager (homebrew) to attempt to install it, but these two methods have not worked.

Upvotes: 0

Views: 433

Answers (1)

sapi
sapi

Reputation: 10224

GCC hasn't shipped with Xcode for quite a while now. Clang is, of course, a working C compiler, so you should be able to make use if it instead.

If you actually need GCC itself for some reason, you can easily compile it from source. That process (especially in grabbing the dependencies) is made a bit more straightforward if you use a package manager like homebrew.

Upvotes: 1

Related Questions