G++ command not found

I have installed Xcode, but whenever I try and execute a file with .x blahblah.c+ terminal returns the error “g++ command not found”. Is there some kind of setup I need to do in Xcode to allow terminal to recognise the command?

Hi,

you must be able to do:

$ g++ -v

on the command line in the terminal. To get the command line tools when installing the latest Xcode 4.3.1 you have to explicitly install the command line tools. Go to Preferences/Downloads/Components and install the “Command Line Tools”.

Cheers, Fons.