Follow Techotopia on Twitter

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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




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 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.

  Published under the terms of the GNU General Public License Design by Interspire