So I am a new programmer and I just installed XCode on my Macbook to get the GCC. I think Xcode is the only way for getting GCC on OSX. Now when I run my Hello World applica
I know it is an old request. But it might still be useful to some. With current versions of MacPorts, you can choose the default gcc version using the port command. To list the available versions of gcc, use:
$ sudo port select --list gcc
Available versions for gcc: gcc42 llvm-gcc42 mp-gcc46 none (active)
To set gcc to the MacPorts version:
$ sudo port select --set gcc mp-gcc46