Compiling and running C++ programs

Discussion in 'Mac OS X Lion (10.7)' started by thrill4rishabh, Jul 24, 2012.

  1. thrill4rishabh macrumors newbie

    Jul 17, 2012

    I learnt C++ on Borland C++. Now I have shifted to mac and am using Eclipse, which is good, but not quite the same.

    I read somewhere that we can write a program in TextEdit and compile and link it via terminal?

    Can anyone tell me how to do that? Please go step by step and very detailed.

  2. meme1255 macrumors 6502a

    Jul 15, 2012
    Czech Republic
    If I were you, I'd install Xcode (free from App Store) ;)
  3. stchman macrumors 6502a

    Jul 16, 2012
    St. Louis, MO
    In order to get gcc and g++ to work from the command line you need to:

    Download and install XCode (free from the app store)
    Install the command line tools in XCode preferences.

    As far as your IDE choice, Eclipse is good, but I prefer Netbeans.

Share This Page