On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com
How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy
An Introduction to GCC
for the GNU Compilers
gcc
and
g++
Revised and updated
Brian Gough
Foreword by Richard M. Stallman
An introduction to the GNU C and C++ Compilers, gcc and g++, which are part of the GNU Compiler Collection (GCC).
Foreword
1 Introduction
1.1 A brief history of GCC
1.2 Major features of GCC
1.3 Programming in C and C++
1.4 Conventions used in this manual
2 Compiling a C program
2.1 Compiling a simple C program
2.2 Finding errors in a simple program
2.3 Compiling multiple source files
2.4 Compiling files independently
2.4.1 Creating object files from source files
2.4.2 Creating executables from object files
2.5 Recompiling and relinking
2.6 A simple makefile
2.7 Linking with external libraries
2.7.1 Link order of libraries
2.8 Using library header files
3 Compilation options
3.1 Setting search paths
3.1.1 Search path example
3.1.2 Environment variables
3.1.3 Extended search paths
3.2 Shared libraries and static libraries
3.3 C language standards
3.3.1 ANSI/ISO
3.3.2 Strict ANSI/ISO
3.3.3 Selecting specific standards
3.4 Warning options in
-Wall
3.5 Additional warning options
3.6 Recommended warning options
4 Using the preprocessor
4.1 Defining macros
4.2 Macros with values
4.3 Preprocessing source files
5 Compiling for debugging
5.1 Examining core files
5.2 Displaying a backtrace
5.3 Setting a breakpoint
5.4 Stepping through the program
5.5 Modifying variables
5.6 Continuing execution
5.7 More information
6 Compiling with optimization
6.1 Source-level optimization
6.1.1 Common subexpression elimination
6.1.2 Function inlining
6.2 Speed-space tradeoffs
6.2.1 Loop unrolling
6.3 Scheduling
6.4 Optimization levels
6.5 Examples
6.6 Optimization and debugging
6.7 Optimization and compiler warnings
7 Compiling a C++ program
7.1 Compiling a simple C++ program
7.2 C++ compilation options
7.3 Using the C++ standard library
7.4 Templates
7.4.1 Using C++ standard library templates
7.4.2 Providing your own templates
7.4.3 Explicit template instantiation
7.4.4 The
export
keyword
8 Platform-specific options
8.1 Intel and AMD x86 options
8.1.1 x86 extensions
8.1.2 x86 64-bit processors
8.2 DEC Alpha options
8.3 SPARC options
8.4 POWER/PowerPC options
8.5 Multi-architecture support
8.6 Floating-point issues
8.7 Portability of signed and unsigned types
9 Troubleshooting
9.1 Help for command-line options
9.2 Version numbers
9.3 Verbose compilation
9.4 Stopping a program in an infinite loop
9.5 Preventing excessive memory usage
10 Compiler-related tools
10.1 Creating a library with the GNU archiver
10.2 Using the profiler
gprof
10.3 Coverage testing with
gcov
11 How the compiler works
11.1 An overview of the compilation process
11.2 The preprocessor
11.3 The compiler
11.4 The assembler
11.5 The linker
12 Examining compiled files
12.1 Identifying files
12.2 Examining the symbol table
12.3 Finding dynamically linked libraries
13 Common error messages
13.1 Preprocessor error messages
13.2 Compiler error messages
13.3 Linker error messages
13.4 Runtime error messages
14 Getting help
Further reading
Acknowledgements
Free software organizations
GNU Free Documentation License
ADDENDUM: How to use this License for your documents
Published under the terms of the GNU General Public License
Design by Interspire
x