
Depending on the user's operating system and the platform, there are lots of C compiler options to choose from. Most of the compilers are available for free however, some compilers and IDE packages are paid.

Thank you.There are plenty of C compilers available online. Please share this commment so if anybody is trying to install gcc can see this solution.

I will be pleased if this comment is helpful to anyone. That means you have successfully installed gcc in your MAC and has been set as the default compiler. Now again type g++ -version and it will show something like this. Now type cd /opt/homebrew/bin, press enter and then type ln -s g++-12 g++ and press enter. So we have to set it to GCC compiler as the default compiler. That means the current default compiler is clang not gcc. Now type g++ -version it will show apple clang instead of gcc. Now type g++-12 -version and it will show the current version of the gcc compiler installed. Now its time to install GCC compiler in your MAC. It should show the list of all the brew commandsĬongratulations now you have successfully installed brew on your mac.

Now reopen the terminal and type brew and press enter. If it doesn't run reopen the terminal and then run it. Then copy the first code and then run it and then copy the second code and then run it. After then it will take take some time to download and install it on your mac.Īfter some time, it will show: View this image. Next it will ask press RETURN to continue and hit return.

Now it will ask for the sudo password and then enter your mac password and then run it. Open Terminal from the launchpad and paste it in your terminal and press enter to run it. Go to brew official website and copy the code below "Install Homebrew", it will be like /bin/bash -c "$(curl -fsSL )" Dear maverick_GOD and everone else who are using MAC, today I am gonna tell you the complete solution on how to use gcc compiler instead of using apple CLANG.
