Unfortunately this violates the one definition rule. That simply means you 
have two identical C++ classes loaded. I guess you have to resolve the 
package/message name for one of them.

On Wednesday, September 21, 2022 at 11:18:15 AM UTC-7 Martin wrote:

> Hi,
>
> I have two different .proto files (say foo.proto and bar.proto) for 
> different services where both use the package name internal and both 
> define a ToService message. I need to use both protocols from the same 
> program, but when I try to do that, I get duplicate symbol linker errors; 
> both define internal::ToService::~ToService and other symbols in the 
> internal:: namespace.
>
> I would really, really prefer to not have to modify the .proto files, 
> since my project just tries to interact with existing services. How do I 
> tell protoc to generate code in a different namespace than internal?
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/e4ec9d78-88a5-4e3e-92a2-553458300900n%40googlegroups.com.

Reply via email to