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

    macrumors newbie

    Joined:
    Nov 23, 2010
    #1
    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. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    That should be usr, not usb.
     
  3. thread starter macrumors newbie

    Joined:
    Nov 23, 2010
  4. macrumors member

    jerry333

    Joined:
    Nov 4, 2005
    #4
    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. thread starter macrumors newbie

    Joined:
    Nov 23, 2010
    #5
    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. macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
  7. thread starter macrumors newbie

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

    macrumors 65816

    Joined:
    Sep 19, 2009
    #8
    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.
     
  9. macrumors 6502

    Joined:
    Nov 23, 2009
    #9
    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