Building and Libraires Items Flashcards
What is C++ project
A C++ project refers to a collection of C++ source code files, libraries, and resources that work together to form a complete program or application. It involves multiple stages of processing, including compilation, assembly, linking, and execution.
What does it mean to build a C++ project?
This process involves multiple steps and tools, preprocessingm compiler, assembler, and linker, which work together to process the source code, resolve dependencies, and produce the final executable.
What does precompiler deal with?
precompiler directives.
What does the #include precompiler directive do?
Goes through the code and processes #include by finding the source file and pastes it in the program
What is the input of the precompiler?
C++ source code
What is the output of the precompiler?
pure C++ code without any precompiler directives
What does the compiler do?
Compiler compiles the high-level program into an assembly language program. Compiles each file into a seperate object file. Each object file corresponds to a specific CPP file. Each object file has 2 areas, text area and data area
Does the compiler deal with header files directly?
No, header files become a part of .cpp files after a precompiler processes the project
What is the output of the compiler?
object files that correspomg to specific CPP files.
What is inside the object file?
CPU instructions, some initial data, symbol table
Symbol table
a table that matches names of labels to the addresses of the memory words that instructions occupy
Who needs symbol table
Linker
Linker
combines multiple object files and library routines into an executable file. Has CPU instructions, initialized static and global data, symbol table.Allows programs to be compiled and assembled by procedures independently, so a change to one line would require compiling and assembling only one procedure
Linker Produces
executable file that can be run on a computer.
What is debug build?
compiler doesn’t care much about optimization. It’s larger in size and slow. Its focused more on catching errors in the program