The MacPorts prefix to the selected version. It symlinks the standard compiler executables in
Gcc for mac capitan install#
If you want to replace (temporarily or permanently) the clang complier by gcc, you can do it by setting the CC env var the following way for example:Įxport CC=/opt/local/bin/gcc-mp-4.9 # set GCC as default C compilerĪs a side note, please note that for the port select gccVersion to work, you will need to install gcc_select: pejvan$ port info gcc_selectĭescription: gcc_select installs files that allow 'port select' to switch the default version of gcc. Warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This is free software see the source for copying conditions.
You can then run gcc with the full path to the binaries: pejvan$ gcc-mp-4.9 -version You can verify you've got the gcc binaries installed: pejvan$ ls -l /opt/local/bin/gcc* the one run withoutĪfter you successfully run the install command for gcc (here version 4.9):
What this means is which versionīecomes the one most would consider the default, e.g. This allows you to choose which version, among several installed versions There is a gcc/g++ 'compatibility' command that is available, but it is a special build of clang/clang++ that is using older gcc compatibility (-with-gxx-include-dir) include files. Select between multiple versions of a versioned port Apple does not include the actual GNU C/C++ compiler in the command-line tool for Xcode, or Xcode itself. The manual states that the select command selects between multiple versions of a versioned port, which I believe is not your case here: pejvan$ port help select I don't think your port select command did what you expected.