Copyright © 2024 by
Rance D. Necaise
|
|
1.3 Program CompilationAs indicated earlier, C is a compiled language. It must be converted or translated from the high-level syntax into executable code for a specific processor. The result is known as an executable program. This translation, known as compiling, is performed using a compiler. Compiling and LinkingThe GNU Compiler Collection[1] is typically used on Linux computer systems to create executable programs. This software collection provides command line applications for creating executable programs from a variety of programming languages. In this text, we will use the Creating an executable C program involves a two step process, compilation and linking. For simple programs consisting of a single source file, the two steps can be combined using a single command:
The
ExecutionThe compilation command above, simple creates the executable program. To execute the program, you must enter the name of the executable program at the command-line the same as you would with a Linux system command:
Remember, executable files in Linux do not have a special extension as they do in Windows. Thus, you only provide the name of the executable in order to execute the program.
Syntax Errors
|