Sunday, January 16, 2011

The compiler and the linker

Paid Recommendations: Convert DVD To AVI . Rip the DVD movie to your computer, protect your DVD. Convert DVD to mp3. Convert DVD to mp4
Find out more at 
http://www.daniusoft.com/dvd-ripper.html

After the source code is created and saved to disk, it must be translated into a language the computer can understand. This job is tackled by the compiler.

The compiler is a special program that reads the instructions stored in the source code file, examines each instruction, and then translates the information into the machine code understood only by the computer’s microprocessor. If all goes well and the compiler is duly pleased with your source code, the compiler creates an object code file. It’s a middle step, one that isn’t necessary for smaller programs but that becomes vital for larger programs.


Finally, the compiler links the object code file, which creates a real, live com­puter program.


If either the compiler or the linker doesn’t understand something, an error message is displayed. At that point, you can gnash your teeth and sit and stew.

Then go back and edit the source code file again, fixing whatever error the compiler found. (It isn’t as tough as it sounds.) Then you attempt to compile the program again — you recompile and relink.

1 The compiler translates the information in the source code file into instruc­tions the computer can understand. The linker then converts that infor­mation into a runnable program. 
2 The GCC compiler recommended and used in this book combines the compiling and linking steps. An object file is created by GCC, but it is
automatically deleted when the final program file is created.
3 Object code files end in OBJ or sometimes just O. The first part of the object file name is the same as the source code filename.
4 Feel free to cheerfully forget all this object code nonsense for now. 
5 Text editor➪Compiler.
6 Source code➪Program.

Welcome to reproduce this passage. Please indicate the source when you reproduce this passage.
Source: C Language 

No comments:

Post a Comment