I have a bunch of .cpp and .c files and i use gcc/make to build a project. On Mac there is only gcc 4.2. It is very old and puts a lot of limitations on the language. I’ve heard clang is the default compiler for Mac. How can i change my makefiles to use clang?
Share
You could try replacing CC=g++ with CC=clang in you makefiles or doing
CC=clang make instead of make
and see if it compiles.
If you use gnu c/c++ extensions or gcc command line options it may not compile, in that case you can try googling for help.