Differences between cc and gcc-linux basic series

Source: Internet
Author: User
Differences between cc and gcc-linux basic series-Linux general technology-Linux programming and kernel information. The following is a detailed description. In terms of name, the CC program of the old unix system is called C Compiler. However, the GCC name is called GNU Compiler Collection according to Gnu. Because gcc contains many compilers (C, C ++, Objective-C, Ada, Fortran, and Java ). So they are different. One is an old C compiler, and the other is a set of Gnu compilers of the compiler (the C compiler in Gcc is much more powerful than CC, so you do not need to use CC ). When you call gcc, the C/C ++ compiler is not necessarily called. gcc automatically identifies and calls the corresponding compiler based on the file extension. For details, refer to $ man gcc.

You cannot download CC because CC comes from expensive Unix systems. CC is a commercial software. to use it, you need to call and write orders, instead of opening your Browser to download.

Cc in linux is a symbolic link of gcc. You can use $ ls? L/usr/bin/cc for simple observation. the console output CC displayed during compilation is a variable pointing to gcc, which is a built-in variable of the make program. Even if you do not have CC = in Makefile, this variable will also exist, and points to gcc by default. The significance of the symbolic links and variables of cc lies in the portability of source code. It is convenient to use GCC to compile the old unix software compiled with cc, and do not even change the Makefile. It also facilitates compilation of linux programs in unix.

A new situation in recent years is the increasing number of unix users. As far as I know, users like solaris and bsd do not use CC much. People must install a gcc, use it to compile C/C ++ programs. The reason is obvious: gcc is powerful and robust. It supports only the new ISO c/c ++ features supported so far. Of course, you 'd better not use night gcc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.