in

Easy GCC and Clang Installation on macOS and Fix Compiler Errors (include not found)



In this tutorial, I’m going to show you how to install GCC and Clang easily on macOS. And fix compiler errors and get started with programming on macOS.

If you’re having problems with your compilers or you just want to get started programming on macOS, then this tutorial is for you! By the end of this video, you’ll be able to install and use the GCC and Clang compilers on your Mac.

πŸ‘‰ Website Article for this Video:

πŸ›οΈ Get my Cheatsheets on Gumroad: https://k0nze.gumroad.com
🌍 Check out my Website: https://k0nze.dev
πŸ’» Join our Discord: https://discord.k0nze.dev
πŸ‘” Follow me on LinkedIn: https://linkedin.k0nze.dev

⏰ Timestamps:
0:00 Intro
0:35 Install GCC on macOS
1:37 How to use GCC on macOS
3:45 Install Clang on macOS
7:40 Set default C and C++ compiler on macOS (CC and CXX)
10:07 Fix include not found C/C++ error on macOS
13:45 How to switch C/C++ compilers on macOS
15:50 Outro
Note: k0nze is the original author of this video, we just embed it, if you have any questions please contact him via Youtube.

Share this:

3 Comments

  1. Thanks for the video. gcc is able to work fine without specifying the CXXFLAGS, but not clang. When it supplied, it still doesn't work. From passing -v, I see an extra space being put into the command to find the sdk path. If I change it to what you have, but remove the space between sysroot and $ for the subexpression, it then works. Any idea why?