First, are you sure you need g ++ 4.7? As you can see on the C ++ 11 page , the latest versions of clang support most C ++ 11. Of course, there are things that g ++ handles, and clang does not, but there are still things that support clang, but g ++ does not. And, more importantly, you already have the latest version of clang, from Apple, configured and ready to go, as your default compiler. In addition, g ++ after 4.2 does not support Mac extensions, for example, -archwhich means you cannot use it to create a lot of third-party software (since most configure scripts assume that if you are on a Mac, your compiler supports Mac extensions) .
g++ 4.7, . /usr/bin/g++ . /usr/bin ( /System) -Apple, ( -, , ).
. Homebrew ( , /usr/local/Cellar/gcc/ 4.7, /usr/local/bin ..) .
g++ /usr/local/bin/g++ g++-4.7.
, /usr/local/bin PATH, /usr/bin, CXX $CXX g++.
GUI IDE, , -. ( Xcode, Apple .)
, . , . ; configure && make .
, , CXX ++ CC C . ( CXX .)
, g++ 4.7 Mac, , configure autoconf, , , , -arch x86_64 Mac .., .