I use OSX 10.10.5
need to compile some c++
code with an old version of gcc
, namely 4.3.4
. I don't think XCode
provide that kind of tools. I suppose there is a way to do that by hand. How can I do that ?
MacOS – installing old version of c++ compiler
gccmacosxcode
Related Question
- MacOS – switch back to clang after installing gcc through Macports on Mavericks
- MacOS – How to link back to the correct C compiler
- MacOS – How to reinstall gcc
- MacOS – Compile CFLite requires some unknown dependencies
- MacOS – How to get llvm-gcc to point to gcc instead of clang
- MacOS – Default c++ compiler version
Best Answer
I have compiled older gcc in the past as a last resort.
brew install gcc
From there you can see if an older gcc is available or worst case, pull that source and compile it from the version of gcc you have running from above. It looks like you'll be able to use homebrew to get at the version 4.3 from the versioned source already in the tool: