Home  >  Article  >  Operation and Maintenance  >  What is gcc in linux

What is gcc in linux

藏色散人
藏色散人Original
2019-05-18 10:58:0122662browse

gcc in Linux is a powerful, multi-platform compiler with superior performance launched by GNU. The gcc compiler can compile and link C, C language source programs and target programs into executable files.

What is gcc in linux

The full name of gcc is GNU Compiler Collection. It is a powerful and high-performance multi-platform compiler launched by GNU. It is a compiler that can Compilers for multiple languages. Initially gcc was used as a C language compiler (GNU C Compiler). Now in addition to C language, it also supports C, Java, Pascal and other languages. gcc supports multiple hardware platforms.

Features of gcc

  • gcc is a portable compiler that supports multiple hardware platforms. For example, ARM, X86, etc.

  • gcc is not only a local compiler, it can also cross-compile across platforms. The so-called local compiler means that the compiled program can only be run in the local environment. Programs compiled by gcc can be run on other platforms. For example, embedded programs can be compiled on x86 and then run on arm.

  • gcc has multiple language front ends for parsing different languages.

  • gcc is designed to be modular and can support new languages ​​and new CPU architectures.

  • gcc is free software. Anyone can use or change this software.

The Gcc compiler can compile and link C, C language source programs, assembler programmers and target programs into executable files. If the name of the executable file is not given, gcc A file named a.out will be generated.

In the Linux system, executable files do not have a unified suffix. The system distinguishes executable files and non-executable files based on the file attributes.
Gcc uses suffixes to distinguish the categories of input files. Let’s introduce some of the convention rules followed by gcc.

.c      是C语言源代码文件
.a      是由目标文件构成的档案库文件
.C/.cc/.cxx     是C++源代码文件
.h      是程序所包含的头文件
.i      是已经预处理过的C源代码文件
.ii     是已经预处理过的C++源代码文件
.m      是Objective-C源代码文件
.o      是编译后的目标文件
.s    &

The above is the detailed content of What is gcc in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn