How to remove gcc command linking to clang

so im trying to compile C code using gcc but it always uses clang instead an clang has some errors how do i make it use gcc when i run gcc main.c and c .


[Email Edited by Moderator]

MacBook Air 13″, macOS 10.15

Posted on Apr 2, 2022 8:57 AM

Reply
1 reply

Apr 2, 2022 9:19 AM in response to LetUsC

If you have not installed GNU v9 C compiler, then that gcc is a hard-link to clang and an older GNU C compatibility suite. Unless you have code that is GNU C dependent, I would recommend clang (not gcc) as it is what I use exclusively. Keeping the GNU C v9 compilation environment and its dependencies separate from the Xcode/Command Line Tools compilation environment is non-trivial.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to remove gcc command linking to clang

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.