2.1 Programs from Conception to Execution

I l @ ve RuBoard

C++ programs are written in a high-level language using letters , numbers , and the other symbols you find on a computer keyboard. Computers actually execute a very low-level language called machine code (a series of numbers). So, before a program can be used, it must undergo several transformations.

Programs start out as an idea in a programmer's head. She writes down her thoughts in a file, called a source file or source code , using a text editor. This file is transformed by the compiler into an object file . Next a program called the linker takes the object file, combines it with predefined routines from a standard library, and produces an executable program (a set of machine-language instructions) . In the following sections, you'll see how these various forms of the program work together to produce the final program.

Figure 2-2 shows the steps that must be taken to transform a program written in a high-level language into an executable program.

Figure 2-2. Transformation of a high-level language into a program
figs/c++2_0202.gif

Fortunately you don't have to run the compiler, assembler, and linker individually. Most C++ compilers use "wrapper" programs, which determine which tools need to be run and then run them.

Some programming systems go even further and provide the developer with an integrated development environment (IDE). The IDE contains an editor, compiler, linker, project manager, debugger, and more in one convenient package. Both Borland and Microsoft provide IDEs with their compilers.

I l @ ve RuBoard


Practical C++ Programming
Practical C Programming, 3rd Edition
ISBN: 1565923065
EAN: 2147483647
Year: 2003
Pages: 364

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net