0.5 Introduction to the Compiler, Linker, and Libraries Flashcards
(11 cards)
What two important tasks do C++ compilers do?
- Checks your code to make sure it follows the rules of the C++ language
- Translates your code into machine language instructions
Where are the compiled machine language instructions stored?
object files
object file
intermediate file that contains machine language instructions and other data that is required or useful in subsequent steps
If you compiled a source code file named “main.cpp,” what would the resulting object file be named?
either main.o or main.obj
linker
combines all object files and produces a desired output file, such as an executable file that you can run
What are the four main steps a linker takes?
- reads each of the object files generated by the compiler and makes sure they are valid
- ensures all cross-file dependencies are resolved properly (ex. if you define something in one .cpp file and use that thing in another .cpp file, it connects the two)
- links in one or more library files
- outputs the desired output file
library files
collections of precompiled code that have been packaged up for reuse in other programs
C++ standard library/standard library
extensive library that provides a set of useful capabilities for use in programs
third-party libraries
libraries that are created and distributed by independent entities
building
the full process of converting source code files into an executable that can be run
testing
the process of assessing whether your software is working as expected