How to use gcc instead of clang on macOS, specially M1? (Help)

Revision en1, by maverick_GOD, 2021-02-21 16:50:06

I code in C++, I was a Windows user, recently switched to mac. I downloaded gcc-10 from homebrew but still, whenever I compile on any editor, it got compiled with Clang. Then I deleted Clang by going to the directory where it was stored, I thought it will then compile with GCC. But now it stops compiling and throwing error messages.

Q.Why do I wish to use gcc instead of clang? -> Clang doesn't have <bits/stdc++.h> header and while solving one question I got to know it doesn't have unordered map also (read on StackOverflow later). -> And I don't know what more is not there in clang.

Can anyone please tell me ========================= either how to successfully compile C++ using gcc on MAC or can tell me all the difference between clang and gcc and how should I manage.

Even I talked with apple care for about 45 mins and they also don't know the solution.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English maverick_GOD 2021-02-21 16:50:06 1046 Initial revision (published)