Wednesday, June 3, 2009
cc or gcc..What is the difference?
I have always lived in an impression that compiling a program with 'gcc' is a better practice than doing so using 'cc'. In fact there have been cases when the same program behaved differently when compiled with cc or gcc.Today I read somewhere that in Ubuntu and most versions of Linux, gcc and cc are synonyms. As in, cc is linked to gcc, and using any of the two for compilation should produce similar behavior.'cc' is the original Unix c compiler while 'gcc' is the GNU-compiler collection and is hence available in all GNU-Linux flavors.' In GNU+Linux operating systems, cc is a symbolic link to gcc.This can be asserted by comparing the outputs of gcc --version and cc --version. /usr/bin/cc is a link to /etc/alternatives/cc, which inturn is a link to /usr/bin/gcc..
Posted by Devika Singh