Strange, this is the first I've heard of this problem affecting C++. Can you possibly split your .proto into multiple files? It takes quite a monster of a file to produce a 64k descriptor, even when using lots of custom options. It seems like such a file would be hard to maintain anyway, so splitting it up would be a good idea.
Also, can you file an issue report? http://code.google.com/p/protobuf/issues/list On Wed, Apr 7, 2010 at 6:22 AM, Iiro <iiro.hiet...@gmail.com> wrote: > The problem seems to occur with Visual C++ 2008 also. The test project > compiled succesfully before because I had accidentally left the > exampleenum.pb.cc and enumextension.pb.cc files out from the solution. > > > > > On 7 huhti, 00:48, Jason Hsueh <jas...@google.com> wrote: > > This sounds like a C++ version of the Java issue fixed with > > r189<http://code.google.com/p/protobuf/source/detail?r=189>: > > the encoded descriptor data in the generated file exceeded the Java > string > > literal limit. This large descriptor was previously built in C++ but was > > removed from the test suite in a later revision. Kenton, do you recall if > > you ever ran the test with VC++2005? Just wondering if it only shows up > in > > certain environments/settings. > > > > > > > > On Tue, Apr 6, 2010 at 12:13 AM, Iiro <iiro.hiet...@gmail.com> wrote: > > > Hi! > > > > > I am having a problem when compiling my libraries which use protobuf > > > generated sources when I'm using the Visual C++ 2005 Professional > > > edition. I am using the version 2.3.0 of Protocol Buffers. > > > > > I have described a custom string EnumValueOptions extension as > > > follows: > > > > > extend google.protobuf.EnumValueOptions { > > > optional string message = 50000; > > > } > > > > > Then, I use this string option in multiple enumeration values in > > > single enumeration proto, somewhat like this: > > > > > enum ExampleEnum > > > { > > > ENUMERATION_OPTION = 1 [(message) = "Enumeration option > > > 1"]; > > > ENUMERATION_OPTION = 2 [(message) = "Enumeration option > > > 2"]; > > > ENUMERATION_OPTION = 3 [(message) = "Enumeration option > > > 3"]; > > > ENUMERATION_OPTION = 4 [(message) = "Enumeration option > > > 4"]; > > > } > > > > > There are a lot more of these in the real implementation (maybe > > > hundreds and the messages are longer). > > > > > When I compile this with Visual Studio 2005 Pro I get: > > > > > "fatal error C1091: compiler limit: string exceeds 65535 bytes in > > > length" > > > > > This comes from the protoc generated file (i.e. exampleenum.pb.cc) > > > > > I have tried to compile this test project also in Linux environment > > > and with Visual C++ 2008 Express edition and the problem does not > > > reproduce. > > > > > I guess that the question is should the Protocol Buffers work when > > > using Visual Studio 2005? I can send you example project files if > > > necessary. > > > > > Thanks for reply in advance! > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Protocol Buffers" group. > > > To post to this group, send email to proto...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > <protobuf%2bunsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/protobuf?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.