-->
Previous Table of Contents Next


cc......C Compiler

cc option filename

PURPOSE

The cc command is the standard C-compiler command. Linux features gcc, the GNU C Compiler, as its C-language tool of choice. Check the listings for gcc for more information.

cpp......C Compiler Preprocessor

cpp option(s) inputfile outputfile

PURPOSE

The C preprocessor is a macro processor that is used by the C compiler to transform your program before actual compilation. For a more detailed explanation, see the info entry for cpp.info and the online-manual pages.

RELATED COMMANDS

gcc
imake

ctags......Vi Tags

ctags option(s)

PURPOSE

The ctags command creates a tag-table file in a format usable by vi. Supported syntaxes are C, C++, Fortran, Pascal, LaTeX, Scheme, Emacs Lisp/Common Lisp, Erlang, Prolog, and most assembler-like syntaxes.

See the online-manual pages for more information.

etags......Emacs Tags

etags option(s)

PURPOSE

The etags command creates a tag-table file in a format usable by emacs. Supported syntaxes are C, C++, Fortran, Pascal, LaTeX, Scheme, Emacs Lisp/Common Lisp, Erlang, Prolog, and most assembler-like syntaxes.

See the online-manual pages for more information.

flex......Fast Lexical Analyzer Generator

flex option(s) filename

PURPOSE

The flex command generates scanner programs that recognize lexical patterns in text. This command reads the given input files, or its standard input if no filenames are given, for a description of a scanner to generate. The description is in the form of pairs of regular expressions and C code, called rules. The output is a C source file. This file is compiled and linked with the -lfl library to produce an executable.

See the online-manual pages for more information.

g77......Fortran Compiler

g77 option(s) filename

PURPOSE

The g77 command compiles Fortran programs. See the info listing for g77 for information on Fortran and this command.

gawk......GNU AWK

gawk option(s) filename

PURPOSE

The gawk command is the GNU version of the AWK programming language—not necessarily a complex language, but an involved one. You’ll want to check the online-manual pages or perhaps even an AWK programming book for more information.

gcc......C/C++ Compiler

gcc option filename

g++ option filename

PURPOSE

The gcc and g++ commands are the C-language and C++-language compilers used in Linux. (Also supported is Objective-C.) Both process input files through one or more of four stages: preprocessing, compilation, assembly, and linking. The gcc command assumes that preprocessed (.i) files are C and assumes C-style linking, while g++ assumes that preprocessed (.i) files are C++ and assumes C++ style linking. Commands work with the following filename extensions:

.c C source; preprocess, compile, assemble
.C C++ source; preprocess, compile, assemble
.cc C++ source; preprocess, compile, assemble
.cxx C++ source; preprocess, compile, assemble
.m Objective-C source; preprocess, compile, assemble
.i Preprocessed C; compile, assemble
.ii Preprocessed C++; compile, assemble
.s Assembler source; assemble
.S Assembler source; preprocess, assemble
.h Preprocessor file; not usually named on command line

Files with other suffixes are passed to the linker. Common cases include:

.o Object file
.a Archive file

A primer on programming and the use of the C language is not presented here; entire libraries cover C programming much better than we can in this limited forum. In addition, there are hundreds of options available for this command; you’ll want to check the info pages for more information.


Previous Table of Contents Next