Engineering Science 1036A/B Lecture Notes - Lecture 4: Object Code, Integrated Development Environment, Binary File

17 views4 pages
Text Editor
The program (source code) is written using the text editor
Source code is saved in to the secondary storage (external memory) with an
extension ".cpp" to let the complier know that it is written in C++ language
Source code needs to be grammatically correct
Preprocessor
program that modifies source code by:
by adding other files
performing various text replacements in the existing code
It executes automatically before the compilation starts
Compilation follows after preprocessing, so none can access the
modifications made by the preprocessor
Complier
Translates source code into an object code that contains machine readable
instructions
Object code is saved on to the disk by the compiler with an extension
".obj" along with the same source-code name
The file is a binary file
Linker
Scans the library that the preprocessor directives have included
Libraries: collection of functions/objects
Selects the needed function or object (precompiled)
Upon linking them into the object file, it produces an executable file with
extension ".exe" and stores it on the disk
Loader
Places the executable file on to the internal memory (RAM), from where the
CPU executes the program, instruction by instruction
Debugger
Locates the problem in the program during the compilation time
Integrated Development Environment (IDE)
Combines editor, compiler, linker and debugger into a single development
environment
Errors
Syntax Errors (parse, compilation error)
Reported by compiler
Program will not compile with erroneous syntax
Runtime errors (Execution error)
Occurs when the programming environment detects an operation that is
impossible to carry out during program execution
Generally encountered due to memory mismanagement issue
Logical errors (or program bugs)
occur when a program doesn't perform the way it is expected to perform
Linker errors
Reported by the linker
Occurs when some function or library that is needed cannot be found
Converting C++ in to Machine Language
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents