[Mac Tutorial] Setting Up GNU's C++ Compiler on MacOS

Правка en1, от altforrandomstuff, 2022-03-18 18:39:23

Hello everyone!

I believe many Mac users have encountered this problem so I decided to post a blog to gain free contributions help them install GNU's GCC. GCC has many useful libraries that Clang (Mac's default c++ compiler) doesn't have. Such as the classic <bits/stdc++.h> and also the Policy Based data structures.

SO let's get to the tutorial. Have Terminal.app opened up because we will be typing a lot of commands. Type cd ~ in the Terminal and press enter, this makes the computer go to the root folder. I will assume that your Terminal is always in the root folder for this tutorial.

Btw, any time you think your Terminal is getting a bit too messy, type clear to clean things up.

Setting up Homebrew

Skip this if you already have Homebrew

Installing GCC

Now that Homebrew is ready, it's time to download what you came here for. This process is actually much simpler than installing Homebrew. All you have to do is type: ~~~~~ brew install gcc --force-bottle ~~~~~ If it doesn't work, try: ~~~~~ homebrew install gcc --force-bottle ~~~~~

Теги gcc, mac, clang, policy based

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en8 Английский altforrandomstuff 2022-03-18 19:41:57 0 (published)
en7 Английский altforrandomstuff 2022-03-18 19:40:04 1
en6 Английский altforrandomstuff 2022-03-18 19:37:49 302
en5 Английский altforrandomstuff 2022-03-18 19:28:07 894 Tiny change: 'e many Mac users hav' -> 'e many MacOS users hav'
en4 Английский altforrandomstuff 2022-03-18 19:05:14 49 Tiny change: 'example:\n' -> 'example:\n![ ](https://photos.app.goo.gl/L61xqkkB7mqHnGBQ7)'
en3 Английский altforrandomstuff 2022-03-18 18:55:03 320
en2 Английский altforrandomstuff 2022-03-18 18:42:06 161
en1 Английский altforrandomstuff 2022-03-18 18:39:23 2796 Initial revision (saved to drafts)