New Macbook Pro, trying to compile through terminal

Discussion in 'Mac Programming' started by Shinny, Mar 3, 2008.

  1. macrumors newbie

    Joined:
    Feb 17, 2008
    #1
    When I first got old macbook, I was able to compile through terminal by just typing g++ and the target. I was in a lab class and I don't remember if someone help me install some stuff so I was able to compile. That the macbook I was using stop working so I now have a Macbook Pro. It arrived this morning so I just took it out of the box and put it in my backpack and rush out the door.

    So I was working on my project for class. I took the files from the school Unix server and put them in my directory. There was a makefile included with it, and I type "make" but it gives me this -bash: make: command not found.
    Then I tried just to g++ my files and it gives me command not found. I'm guessing I don't actually have a compiler. Is that the right conclusion? If that right, do I go download xcode and will I be able to compile through terminal?
     
  2. TEG
    macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #2
    Use gcc. If all those aren't there, then you need to install the XCode Tools, because, I don't they they are installed my default.

    TEG
     
  3. thread starter macrumors newbie

    Joined:
    Feb 17, 2008
    #3
    I think I don't have gcc that's probably why I can't compile my programs when type g++. If I download Xcode will it install everything so I'd be able to the compiler though terminal ?
     
  4. macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #4
    Yup.
     
  5. TEG
    macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #5
    Yes.

    TEG
     
  6. thread starter macrumors newbie

    Joined:
    Feb 17, 2008
    #6
    Thanks for the help, I knew there was something missing when I tried to run makefile.
     
  7. thread starter macrumors newbie

    Joined:
    Feb 17, 2008
    #7
    I didn't want to make a new thread but it's about Xcode. In the old Xcode, I don't remember what version, I could just command r and it would pop out my program so I could test it. In this new version, it doesn't do that. Is there a way that I can get it to pop up because it's kind of a minor hassle everytime I want to test out my program.
     
  8. TEG
    macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #8
    I don't know, as I just used terminal for the compiling and testing, and just used Xcode for the Syntax highlighting.

    TEG
     
  9. macrumors 6502a

    Joined:
    Sep 7, 2005
    #9
    Open the console: ⇧⌘R (Run->Console)
     

Share This Page