1 process with 2 components - a client and a server
Both Client and Server make use of a Model.proto
Client and Server are built with different versions of Model.proto

Server generates .h and .cc files at buildtime and compiles them into Sever's use of the proto is contained solely within
Client also generates .h and .cc files at buildtime and builds a library Client's use of the proto is in a different library
libClient depends on both libServer and libClientProto

How do I guarantee at runtime that libClient uses libClientProto to create 
proto classes instead of libServer, since both libClientProto and libServer 
supply the same proto symbols?
Even though Client and Server communicate with serialized proto objects, if 
Client was built with version 1 of Model.proto but Server was built with 
version 2, I see crashes when destructing proto classes due libClient using 
libServer for its proto.

I know a better approach would be to ensure the proto .cc files are 
compiled into the same library where the proto classes are used, but how 
can I prevent a future Client2 making this same mistake above?

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to