How to "include" my protobuf .pb files from one module/plugin to another plugin in c++?

Hello. I’am developing some plugins using google protobuf with its static library (libprotobuf.lib). Everything goes well when I put all codes and .pb files in only one plugin, but giving errors when working with over two plugins which are depended on the first plugin that contains all .pb files they need.

For code pb::ros::geometry_msgs::PoseStamped* PoseMsg = new pb::ros::geometry_msgs::PoseStamped(); in my second plugin it gives error:

  unresolved external symbol "const pb::ros::geometry_msgs::PoseStamped::`vftable'" (??_7PoseStamped@geometry_msgs@ros@pb@@6B@) referenced in function "protected: virtual void __cdecl AMyProtobuf::BeginPlay(void)" (?BeginPlay@AMyProtobuf@@MEAAXXZ)


  unresolved external symbol "protected: __cdecl pb::ros::geometry_msgs::PoseStamped::PoseStamped(class google::protobuf::Arena *,bool)" (??0PoseStamped@geometry_msgs@ros@pb@@IEAA@PEAVArena@protobuf@google@@_N@Z) referenced in function "protected: virtual void __cdecl AMyProtobuf::BeginPlay(void)" (?BeginPlay@AMyProtobuf@@MEAAXXZ)

It looks as if my second plugin fail to access the .pb file in my first plugin, but I have put the first module name in my second plugin build.cs file as private depedency (PrivateDependencyModuleNames) and plugin in uplugin. It could access the other files which are UE classes as usual.

So, how to “include” my protobuf .pb file from one module/plugin in c++ to another plugin? Any advise? Thx!

BTW, I could not copy the .pb files under the second plugin, since all the c++ files must be unique for package.