Yes. There is an undocumented option to --cpp_out which will do this:
--cpp_out=dllexport_decl=MY_EXPORT_MACRO:output/direcotry
For an example of this, see generate_descriptor_proto.sh, which generates descriptor.pb.{h,cc} from descriptor.proto.
It's undocumented because I'm concerned that exposing protocol buffer objects from DLLs may not be a great idea in general due to ABI compatibility issues -- e.g. if you add a new field and recompile your DLL, every program linked against it will also have to be recompiled. But, if you know what you're doing, feel free to use it.