Search code examples
c++macosgccmacports

How to use the gcc installed in macports?


I installed gcc 4.6. from macports (for support of C++0x). But when I check the 'gcc --version` it is showing older version. How to use the newer gcc installed by macports?


Solution

  • I remember it being something like g++-mp-4.6. I believe it's enough to set the environment variable CXX to that.