I am creating a client server architecture where I use c++ as my backend and QML/c++ as my frontend.. I share commomn c++ structures in a common library that make up the data that is passed between the client and server through it’s API.
So now if I have a structure like this in the common library v 1.0
struct DummyStruct{
public:
int x;
int y;
}
Then I update the structure and release a new version of the common library version 1.1
struct DummyStruct{
public:
int x;
int y;
string z;
}
- service is now compiled with common version 1.1
- client A was compiled with common version 1.0
- now Client A’s underlying system is updated with newest version of the common 1.1 my understanding this breaks ABI because of adding a non-static public member to the struct.
Any further explanation on ABI would helpful if I am missing something. I believe I would need to hide all my structs that define my API with the pimpl pattern.
Source: Windows Questions C++