Thiago Macieira: Binary compatibility for library developers
Channel: CppNow
Date: 2013-06-13

The C++ standard, just like the C standard, defines many important behaviours of the compiler and what constitutes a well-formed program. They intentionally steer clear from any issues related to ABI and binary compatibility. They don't even currently discuss the existence or challenges related to dynamic linking and modules maintained independently from one another. Because it is much more complex and powerful than C, compilers implement a C++ ABI that is an order of magnitude more complex than C++. And unlike C, ABIs for C++ vary quite a lot between compilers, even within one single platform (operating system and architecture).

Yet developers for libraries are often faced with understanding and dealing with those issues that are out-of-scope for the C and C++ standards. Far from an impossible task, there are simple guidelines, checklists, tooling, and processes that can be relied upon to guarantee binary compatibility between releases. Using them, it is possible to maintain large libraries compatible with previous versions for a long time, across multiple releases.

This presentation will talk about those real-world problems and their solutions, heavily drawing upon the solutions used by both Qt and KDE. In particular, it will show how Qt 4 maintained its releases binary compatible for over 7 years across 9 feature releases and dozens of patch releases. It will also show the mistakes made and corrected. To do that, this presentation will need to discuss details of how compilers implement their ABI.
---

*--*

---