Domanda

I have a class which has many static members, but I have added new function in the middle of the header file.

Does this break binary compatibility? Clients need to be recompiled?

EDIT (1): Class has only static functions, no other functions and data members

È stato utile?

Soluzione

Your class has no virtual functions, so your new middle function will not change the v-table. Other static members in the class (functions and global variables/data) are invoked by the appropriate symbol name on Linux, Unix or Mac and your change is backward compatible.

But it's a breaking change on Windows because all functions are invoked by the ordinal number instead of the name (unless you are using def files to define custom ordinals for functions).

Try the abi-cc tool to automatically check backward binary compatibility of your libraries.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top