new mac user trying to compile C++

Discussion in 'Mac Programming' started by Eetrey, May 9, 2010.

  1. Eetrey macrumors newbie

    Joined:
    Apr 20, 2010
    #1
    Ok, so i have not written in C++ for at a bit more than two years. I have been writing in an interpreted language most recently, Matlab to be specific. I just got a mac and I would like to compile a simple program written in a text editor. I have already installed Xcode. Can anyone give me suggestions on how to write a simple text file and then compile it through the mac terminal? thanks in advance.
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    Install gcc ... it's included with the Developer Tools.
     
  3. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #3
    You need to install the command line tools, which are NOT installed by default when Xcode is installed. This is easily fixed - just reinstall Xcode, and select the command-line tools option from the custom install screen.
     

Share This Page