new mac user trying to compile C++

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

  1. Eetrey macrumors newbie

    Apr 20, 2010
    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


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


    Jun 6, 2003
    Solon, OH
    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