Back to Basics: Compiling and Linking
summary
Explains exactly how preprocessing, compilation, instantiation and linking produce object files and how inline and constexpr functions become allowed multiple definitions, why explicit template specializations belong in source files, and how explicit template instantiation forces a single emitted definition. Shows using a linker script to place code and data in RAM or flash, walks a concrete example program through each build stage, and demonstrates the instantiation+linker approach reduces rebuilds and yields the expected memory layout.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:36Compiling and Linking
- 6:44Declarations and definitions
- 9:44Function declarations
- 14:44The build process
- 22:04Object files
- 29:01One definition rule
- 41:53Templates
- 45:45Functions and Classes
- 46:54Template Definition
- 49:34Memory Map
- 51:13Linkers
- 56:08Explicit Instantiation
- 57:53Examples
related talks
01h 03mBack to Basics: Function and Class Templates
01h 26mWhat Does the Linker Actually Do for Us?
01h 23mC++ Linkers and the One Definition Rule
01h 04mconstexpr: Introduction
01h 04m“Understanding Optimizers: Helping the Compiler Help You”
59mHello World From Scratch
01h 00mFrom Program to Process - What Happens After the Compiler
57mIntroduction to C++ Template Metaprogramming
