Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chrisc23

macrumors newbie
Original poster
Nov 23, 2010
13
0
Hi there everybody. I have just began to try and start learning how to program and have started with trying to learn how to program in C. I downloaded Xcode 3.2.4 but I have already got a problem that when I write a program in the Command Line Tool I keep getting an error message that says Can't exec ' /Developer/usr/bin/gcc-4.2' (No such file or directory) please help?
 
Last edited:
You shouldn't have to have the -4.2 at the end. Just /Developer/usr/bin/gcc because you might not have version 4.2 installed.

To see what is installed:

Note that gcc is a link to gcc-4.2 on my system, but yours could be different.

$ ls -l /Developer/usr/bin/gcc*
lrwxr-xr-x 1 root wheel 7 May 23 2010 /Developer/usr/bin/gcc -> gcc-4.2
-rwxr-xr-x 1 root wheel 97392 Jul 26 13:35 /Developer/usr/bin/gcc-4.0
-rwxr-xr-x 1 root wheel 166128 Jul 26 14:05 /Developer/usr/bin/gcc-4.2
 
What do I need to do to find out what gcc is on my system? Will a more updated gcc make the error message go away?
 
Hi there everybody. I have just began to try and start learning how to program and have started with trying to learn how to program in C. I downloaded Xcode 3.2.4 but I have already got a problem that when I write a program in the Command Line Tool I keep getting an error message that says Can't exec ' /Developer/usr/bin/gcc-4.2' (No such file or directory) please help?

Why is it in /Developer? My command line compilers are all in /usr/bin.

Run this and show us the results:

Code:
which gcc

[edit] I realize that Xcode's compilers are in /Developer; it seems to me the OP is referring to the command line tools.
 
Last edited:
I have /Developer/usr/bin/gcc-4.2 on my OS X 10.6 system. My guess is that when you installed Xcode, it didn't install gcc there for some reason. I recommend re-running the installer and making sure that every software package is selected for install (you may have to click "Customize" to do this).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.