Basic GCC Usage

  • Kurt Wall
  • William Von Hagen

Abstract

This chapter’s goal is to get you comfortable with typical GCC usage. It goes behind the scenes and dissects the half-dozen or so GCC command-line options you use by habit. When you invoke GCC to compile a source code file, the compilation process passes through as many as four stages: preprocessing, compilation, assembly, and linking. You will learn in this chapter how to stop the compilation process at any one of these stages. GCC also accepts many additional options that control the behavior of the preprocessor, the linker, and the assembler, so this chapter shows you the ins and outs of these magic GCC incantations, too. Other options discussed in this chapter allow you to modify the directory search path GCC uses when it runs and also enable you to exercise greater control over the content format of GCC’s diagnostic messages. You will also learn how to tell GCC which dialect of C, such as strict ANSI/ISO C or good ole Kernighan and Ritchie (K&R) C, it should expect. Finally, you will learn a variety of command-line options you can use when compiling C++ code.

Keywords

Prefix Suffix Folk Vanilla Alloca 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Kurt Wall and William von Hagen 2004

Authors and Affiliations

  • Kurt Wall
  • William Von Hagen

There are no affiliations available

Personalised recommendations