I want to use the gnu compiler collection instead of the x-code compiler to compile some bioinformatics tools on the mac, which did compile on Linux but fails to build on macOS.
I did install homebrew
$ brew install gcc $ cd /usr/local/bin $ sudo ln -s /opt/homebrew/bin/gcc-11 gcc $ /usr/local/bin/gcc gcc: fatal error: no input files $ which gcc /usr/local/bin/gcc
However, calling gcc without the path still points to clang.
$ gcc clang: error: no input files
How can I point gcc and g++ to the gnu compiler collection?