문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top