I need gcc as a default compiler to compile cuda samples and I need clang to compile my network projects because clang has better warnings and errors specifications.
Is there any way to run both compilers?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Yes you can.
Apple's Xcode supplies clang (and puts in /usr/bin/gcc a link to clang not gcc)
Then you can then install gcc - probably the easiest way is via a package manager like Macports, Homebrew or Fink