New to programming. Having trouble with Xcode

Discussion in 'Mac Programming' started by chrisc23, Nov 23, 2010.

  1. chrisc23, Nov 23, 2010
    Last edited: Nov 23, 2010

    chrisc23 macrumors newbie

    Nov 23, 2010
    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?
  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    That should be usr, not usb.
  3. chrisc23 thread starter macrumors newbie

    Nov 23, 2010
  4. jerry333 macrumors regular


    Nov 4, 2005
    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
  5. chrisc23 thread starter macrumors newbie

    Nov 23, 2010
    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?
  6. lloyddean macrumors 6502a

    May 10, 2009
    Des Moines, WA
  7. chrisc23 thread starter macrumors newbie

    Nov 23, 2010
    I am running gcc 4.2.1
  8. mac2x, Nov 24, 2010
    Last edited: Nov 24, 2010

    mac2x macrumors 65816

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

    Run this and show us the results:

    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.
  9. jabbott macrumors 6502

    Nov 23, 2009
    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).

Share This Page