(You figured this part out already, but I'm answering for the record.) On Thu, Oct 1, 2009 at 12:46 AM, Carlo Medas <[email protected]> wrote:
> > Dears, > > we have rpc.proto with a base message, then mathpeer.proto with > messages that extend the base RpcMessage. > > The rpc.proto is built and compiled inside a core.dll, using the -- > cpp_out=dllexport_decl directive you explained us before. > The mathpeer.proto is built inside an exe which is linked against > core.dll and libprotobuf (static version). > Nope, that won't work. If you link libprotobuf statically, then you actually end up with *two copies* of it, one in the exe and one in the dll. These copies don't know about each other and thus cannot interact with each other. If you want to pass protobuf objects across DLL boundaries, you *must* link libprotobuf itself as a DLL. > It seems to me that the extension registry is not the same for DLL and > EXE, or something like that. > As I've been reading some other thread, could this be caused by the > fact that we are linking to a static libprotobuf in both DLL and exe? > Yes, exactly. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---
