LNK2019. Trying to include files that don't have an api module from one module to another.

Hi. I have two proto files packets.pb.cc and packets.pb.h (protobuf auto-generated file). They are in the primary module in the public folder, I want them to be used in another module, but when i include them, an error is generated LNK2019 and LNK2001.

How can I fix it?