Binary compatibility for dynamic libraries ( .dll , .so ) is often important.
eg. you donβt want to recompile half of the software on the OS because you have updated some low-level library that everyone uses in an incompatible way (and consider how often security updates can occur). Often you cannot even use the entire source code, even if you want.
To update your dynamic library that is compatible and actually has an effect, you can hardly change anything in the public header file, because everything that was compiled into these other binaries directly (even in C code, this often includes the sizes of structures and layouts of elements, and obviously you cannot delete or modify any function declarations).
In addition to C problems, C ++ introduces much more (the order of virtual functions, how inheritance works, etc.), so itβs quite possible that you can do something that modifies the automatically created C ++ constructor, a copy, destructor etc. otherwise maintaining compatibility. If they are defined as "built-in" along with the class / structure, and not explicitly in your source, then they will be included directly by other applications / libraries that link your dynamic library and use these automatically generated functions, and they will not receive your modified version ( which you might not even understand has changed!).
Fire lancer
source share