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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2004 Kurt Wall and William von Hagen
About this chapter
Cite this chapter
Wall, K., Von Hagen, W. (2004). Basic GCC Usage. In: The Definitive Guide to GCC. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0704-7_3
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0704-7_3
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-59059-109-3
Online ISBN: 978-1-4302-0704-7
eBook Packages: Springer Book Archive