Consider this case:
static lib A -> this contains my protobuf definition of MyMessage
dll B -> links A
exe C -> links A
In run time: a protobuf message was passing from dll B to exe C, when exe C trying to store it locally by assign the message in a local variable, CheckTypeAndMergeFrom failed and triggered fatal error. The warning looks like this:
"Invalid call to CheckTypeAndMergeFrom between types MyMessage and MyMessage“
It seems the type check compares the pointer of ClassData, in my case there two instance so the comparison failed.
A, B and C are all from one same code base and always compiled together, so the message definition won't diverge. The type check has limitation in this case, is there any way to alleviate this?