Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Manual do Utilizador Página 17

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 24
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 16
Chapter 3.
Developing with Red Hat Enterprise Linux
Developer Tools
Use the tutorials in this chapter to learn about standard native development with the tools.
See http://www.redhat.com/docs/manuals/gnupro/ for details about the tools.
3.1. Create Source Code
To start, create the following sample source code file and save it as hello.c. The following sections
show you how to compile this file to form an executable and how to run it.
#include <stdio.h>
int a, c;
static void
foo (int b)
{
c = a + b;
printf ("%d + %d = %d\n", a, b, c);
}
int
main (void)
{
int b;
a = 3;
b = 4;
printf ("Hello, world!\n");
foo (b);
return 0;
}
Example 3-1. Source code to save as hello.c
3.2. Compile, Assemble, and Link from Source Code
To compile the code, use the following command:
gcc -g hello.c -o hello
The -g option generates debugging information and -o specifies the name of the executable to be pro-
duced. Both of these can be omitted. Other useful options include -O to enable standard optimizations
and -O2 for extensive optimizations. If no -O is specified, GCC will not optimize.
See Using the GNU Compiler Collection (GCC) for additional basic compiler information.
Vista de página 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 23 24

Comentários a estes Manuais

Sem comentários

Trio-motion-technology MC403 manuels

Manuels d'utilisation et guides de l'utilisateur pour Capteurs Trio-motion-technology MC403.
Nous fournissons des manuels en pdf 1 Trio-motion-technology MC403 à télécharger gratuitement par type de document : Manuel de l'utilisateur






Plus de produits et de manuels pour Capteurs Trio-motion-technology

Modèles Type de document
MC405 Manuel de l'utilisateur   Trio Motion Technology MC405 User Manual, 8 pages
MC224 Manuel de l'utilisateur   Trio Motion Technology MC224 User Manual, 8 pages
MC4N-ECAT Manuel de l'utilisateur   Trio Motion Technology MC4N-ECAT User Manual [ru] , 12 pages
MC302x Manuel de l'utilisateur   Trio Motion Technology MC302x User Manual, 8 pages
CAN 8 Relay Out Manuel de l'utilisateur   Trio Motion Technology CAN 8 Relay Out User Manual, 2 pages
MC206x Manuel de l'utilisateur   Trio Motion Technology MC206x User Manual [ru] , 8 pages
PCI 208 Manuel de l'utilisateur   Trio Motion Technology PCI 208 User Manual, 20 pages
Uniplay HMI Manuel de l'utilisateur   Trio Motion Technology Uniplay HMI User Manual, 12 pages