Red Hat Enterprise Linux 4: Developer Tools Guide | ||
---|---|---|
Prev | Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools | Next |
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 produced. 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.