Introduccion A Gcc

Páginas: 61 (15168 palabras) Publicado: 17 de diciembre de 2012
An Introduction to GCC
for the GNU Compilers gcc and g++

Brian Gough Foreword by Richard M. Stallman

A catalogue record for this book is available from the British Library. First printing, March 2004 (7/3/2004). Published by Network Theory Limited. 15 Royal Park Bristol BS8 3AL United Kingdom Email: info@network-theory.co.uk ISBN 0-9541617-9-3 Further information about this book isavailable from http://www.network-theory.co.uk/gcc/intro/ Cover Image: From a layout of a fast, energy-efficient hardware stack.(1) Image created with the free Electric VLSI design system by Steven Rubin of Static Free Software (www.staticfreesoft.com). Static Free Software provides support for Electric to the electronics design industry. Copyright c 2004 Network Theory Ltd. Permission is granted tocopy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A Network Theory Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”.(a) The Back-Cover Text is: “The development of this manual was funded entirely by Network Theory Ltd. Copies published by Network Theory Ltd raise money for more free documentation.” The Texinfo source for this manual may be obtained from: http://www.network-theory.co.uk/gcc/intro/src/
(1)

“A Fast and Energy-Efficient Stack” by J. Ebergen, D. Finchelstein, R. Kao, J. Lexau and R. Hopkins.

iTable of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 1.2 1.3 1.4 A brief history of GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Major features of GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming in C and C++ . . . . . . . . . . . . . .. . . . . . . . . . . . . Conventions used in this manual. . . . . . . . . . . . . . . . . . . . . . . 3 4 4 5

2

Compiling a C program . . . . . . . . . . . . . . 7
2.1 2.2 2.3 2.4 Compiling a simple C program . . . . . . . . . . . . . . . . . . . . . . . . 7 Finding errors in a simple program . . . . . . . . . . . . . . . . . . . . 8 Compiling multiple source files . . . . . . . . . . . .. . . . . . . . . . . . 9 Compiling files independently . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4.1 Creating object files from source files . . . . . . . . 11 2.4.2 Creating executables from object files. . . . . . . . 11 2.4.3 Link order of object files. . . . . . . . . . . . . . . . . . . . 12 Recompiling and relinking . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Linking withexternal libraries . . . . . . . . . . . . . . . . . . . . . . . 14 2.6.1 Link order of libraries . . . . . . . . . . . . . . . . . . . . . . 15 Using library header files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.5 2.6 2.7

3

Compilation options . . . . . . . . . . . . . . . . . 19
3.1 Setting search paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3.1.1 Search path example . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Environment variables . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Extended search paths . . . . . . . . . . . . . . . . . . . . . Shared libraries and static libraries . . . . . . . . . . . . . . . . . . . C language standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 ANSI/ISO . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Strict ANSI/ISO . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Selecting specific standards . . . . . . . . . . . . . . . . . Warning options in -Wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional warning options . . . . . . . . . . . . . . . . . . . . . . . . . . 19 20 21 22 23 25 26 28 28 29 30...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Compiladores Gcc
  • Dj Gcc
  • Gcc Gdb Y Abstraccion
  • Poster de la visita al laboratorio de materiales de gcc
  • Introduccion
  • Introduccion
  • Introduccion
  • Introducción

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS