View Full Version : Compiling and running C++ programs

Jul 24, 2012, 11:20 AM

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.


Jul 24, 2012, 02:43 PM
If I were you, I'd install Xcode (free from App Store) ;)

Jul 24, 2012, 03:48 PM
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.