0.5 Introduction to the Compiler, Linker, and Libraries Flashcards

(11 cards)

1
Q

What two important tasks do C++ compilers do?

A
  1. Checks your code to make sure it follows the rules of the C++ language
  2. Translates your code into machine language instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where are the compiled machine language instructions stored?

A

object files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

object file

A

intermediate file that contains machine language instructions and other data that is required or useful in subsequent steps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If you compiled a source code file named “main.cpp,” what would the resulting object file be named?

A

either main.o or main.obj

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

linker

A

combines all object files and produces a desired output file, such as an executable file that you can run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the four main steps a linker takes?

A
  1. reads each of the object files generated by the compiler and makes sure they are valid
  2. 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)
  3. links in one or more library files
  4. outputs the desired output file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

library files

A

collections of precompiled code that have been packaged up for reuse in other programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

C++ standard library/standard library

A

extensive library that provides a set of useful capabilities for use in programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

third-party libraries

A

libraries that are created and distributed by independent entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

building

A

the full process of converting source code files into an executable that can be run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

testing

A

the process of assessing whether your software is working as expected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly