On 22 Set, 21:20, Aron Bierbaum <
aronbierb...@gmail.com> wrote:
> 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 --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 which defines MY_EXPORT_MACRO. I'm
> > open to patches to fix this. Or, you could use a hack to work around it,
> > such as adding the #include via some sort of text processing after protoc
> > finishes, or perhaps moving the .pb.h to .pb2.h and replacing the .pb.h file
> > with one that first includes your header then includes the .pb2.h...
>