Thoroughly Understanding C++ ABI (2024)
- Programming
- C++
- Infrastructure
- Developer Tools
The post is a deep explainer on C++ ABI, the binary-level rules that decide how functions are called, how classes and vtables are laid out, how exceptions work, and whether object files built by different compiler versions can actually interoperate. That matters because C++ source compatibility is not binary compatibility. Two pieces of code can both be valid C++ and still fail to link or behave correctly if they were built against different compiler, standard library, or platform ABI assumptions.
If your product ships plugins, shared libraries, SDKs, or cross-language bindings, treat ABI as an explicit design constraint instead of assuming "same language" means compatible binaries. When you need long-lived interoperability, prefer a narrow C or COM-style boundary and be cautious about exposing standard library types across it.
-
ykiko.me
- Discuss on HN