Switched to Lion - Now GCC is non-existant

Joined
Nov 6, 2011
Messages
2
Reaction score
0
Points
1
Hi,

I recently switched to OS X Lion. Previously, I had compiled all my C programs from the command line using GNU with the command "gcc" or "make" with a Makefile specifying the use of gcc.

After installing OS X when I type in "gcc --V" I get a "-bash: gcc: command not found." And when typing in "whereis gcc" nothing at all happens. In fact, I looked at /usr/bin/* and there was no folder for gcc.

Now here is the curious thing, my XCode works just fine for command line C programs. I can probably survive off of XCode - I was going to switch anyway - but it really irks me that I have no idea how my programs are being compiled. I worry that if I need to install a library or something I may run into problems.

I am willing to follow any advice to try to fix this issue. Thank you!
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,247
Reaction score
1,834
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Hang on for a bit. One of our Staff members (Vansmith) is our resident expert on programming. I'm sure he'll be able to assist with some advice.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,943
Reaction score
578
Points
113
Location
Queensland
Your Mac's Specs
Too many devices to list
It sounds as if the symlinks don't work (for whatever reason). Is gcc in /Developer/usr/bin? If so, try the following:
Code:
sudo ln -s /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 /usr/bin/gcc
 
OP
E
Joined
Nov 6, 2011
Messages
2
Reaction score
0
Points
1
Wow! That worked perfectly. Thank you for being very helpful and timely. It seems I know less about the file structure of my mac than I thought...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top