Appendix C. Compiling Programs with gcc

THIS APPENDIX SUMMARIZES SOME OF THE more commonly used gcc options. For information about all command-line options, under Unix, type the command man gcc. You can also visit the gcc Web site, http://gcc.gnu.org/onlinedocs, for complete online documentation.

This appendix summarizes the command-line options available in gcc, release 3.3, and does not cover extensions added by other vendors, such as Apple Computer, Inc.

General Command Format

The general format of the gcc command is

gcc [options] file  [file ...]

Items enclosed in square brackets are optional.

Each file in the list is compiled by the gcc compiler. Normally, this involves preprocessing, compiling, assembling, and linking. Command-line options can ...

Get Programming in C, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.