GNU C Compiler

This section provides a quick introduction of GNU C Compiler developed by the GNU Project. It offers a single command, gcc, to preprocess, compile, assembly and link C programs as one step.

What Is GCC? GCC originally stood for "GNU C Compiler". But now it stands for "GNU Compiler Collection". GCC now contains compilers for C, C++, Fortran, Java and Ada.

GCC offers a single command, gcc, to preprocess, compile, assembly and link C programs as one step. Here is an example on a Linux system:

\home\herong>cat hello.c
#include <stdio.h>
main() {
   printf("Hello world!\n");
}

\home\herong>gcc hello.c -o hello

\home\herong>hello
Hello world!

If you want to break the "gcc" command into multiple steps of preprocessing, compilation, assembling and linking, you can use different options as shown in the example below:

\home\herong>gcc -E hello.c -o hello.i

\home\herong>gcc -S hello.i -o hello.s

\home\herong>gcc -c hello.s -o hello.o

\home\herong>gcc hello.o -o hello

\home\herong>hello
Hello world!

Table of Contents

 About This Book

 2002 - .NET Framework Developed by Microsoft

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 1995 - Java Language Developed by Sun Microsystems

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1984 - X Window System Developed a MIT Team

 1984 - Macintosh Developed by Apple Inc.

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 1978 - The C Shell Developed by Bill Joy

 1977 - The Bourne Shell Developed by Stephen Bourne

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1976 - vi Text Editor Developed by Bill Joy

 1974 - Internet by Vinton Cerf

1972 - C Language Developed by Dennis Ritchie

 What Is C Language

 TCC - Tiny C Compiler

 Compilation and Execution Process of C Programs

GNU C Compiler

 Sample C Program for Arrays and Pointers

 Sample C Program for Dynamic Memory Allocation - malloc()

 1971 - FTP Protocol Created by Abhay Bhushan

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1957 - FORTRAN Language Developed by IBM

 References

 Full Version in PDF/EPUB