Installing C++ Compiler on macOS
For this course, we have no need to additionally install a C++ compiler. The default compiler is already included in the Xcode Command Line Tools.
You can check it by typing clang --version in Terminal.
C++ Compilers
Based on the course, you may not need to install a C++ compiler. However, if you don't have Xcode installed, you can install c++ compilers like GCC and Clang.
Install GCC
To install GCC on macOS, you can use Homebrew. First, update Homebrew by running the following command in your terminal:
brew updateThen, install GCC by executing the following command:
brew install gccVerify Installation
After the installation is complete, you can verify that GCC has been successfully installed by checking its version:
$ gcc --version
> gcc version 11.2.0 (Homebrew GCC 11.2.0_3)Additional Resources
Makefiles, CMake, and Build Systems
For more advanced C++ projects, you may need to use build systems like Makefiles and CMake. You can learn more about these build systems by following the links below: