Link compatibility
summary
Library headers often hide build-time config flags that change struct layout and cause subtle memory corruption when client and library differ. The fix is to emit a buildconfig header that concatenates active options into a unique symbol, define that symbol in the library and force clients to call it so a mismatch produces a link error rather than runtime corruption. Uses pkg-config or boost.build for propagation and prefers namespace-based ABI design for long term stability.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:20Libraries
- 0:36struct
- 2:00memory corruption
- 2:16buildconfig
- 2:53empty function
- 3:21instantiate
- 3:31binary layout
related talks
01h 29mC++ API & ABI versioning
16mMind the Gap (Between Your Code and Your Toolchain)
26mC++ Modules Myth Busting
01h 16mPolymorphism, Cohesion, and Coupling in C++
50mShared Libraries in Windows and Linux
01h 37mC++ And Beyond: Discussion
01h 07mBuilding C++ Modules
01h 00mThe Power and Pain of Hidden Symbols in C++ Programming
