Sample Header Ad - 728x90

How can I point gcc and g++ to the gnu compiler collection?

3 votes
2 answers
2193 views
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?
Asked by witek (131 rep)
Jan 26, 2022, 08:59 PM
Last activity: Mar 26, 2022, 02:42 PM