Protobuf with MSVC: how to export generated Message

2009-09-22 Thread Carlo Medas
Dears, we have a rpc.proto built inside our core framework, built as a DLL. Other protos contain extension to base message defined in rpc.proto, and they are built in separate and different executables. The MSVC linker compains for error since the RpcMessage class (defined in rpc.proto) and

Re: Protobuf with MSVC: how to export generated Message

2009-09-22 Thread Kenton Varda
If you invoke protoc like: protoc --cpp_out=dllexport_decl=MY_EXPORT_MACRO:path/to/output/dir myproto.proto then it will generate code with MY_EXPORT_MACRO in all the right places. However, this option is incomplete -- currently there is no way to force the generated .pb.h to #include a header

Re: Protobuf with MSVC: how to export generated Message

2009-09-22 Thread Aron Bierbaum
We currently get around this limitation by forcing the the header to be included using compiler command line flags: Windows: /FIproject/Config.h Linux: -include project/Config.h -Aron On Tue, Sep 22, 2009 at 11:37 AM, Kenton Varda ken...@google.com wrote: If you invoke protoc like:   protoc