FYI, in case anyone else is stuck using VC++ 7.1, I had to apply the patch below to get protobuf 2.0.2 to compile.
I'd be much obliged if the folks at google would consider applying this to the main repository, as it enables support for Visual Studio 2003 and seems otherwise harmless. (It didn't break any tests on gcc 3.4.6, at least...) Links: - http://msdn.microsoft.com/en-us/library/cx7k7hcf(VS.71).aspx - http://www.mailarchive.ca/lists/comp.lang.c++.moderated/2006-10/0609.html -------- diff -r 550ab124808b src/google/protobuf/descriptor.cc --- a/src/google/protobuf/descriptor.cc Fri Nov 07 12:17:22 2008 -0500 +++ b/src/google/protobuf/descriptor.cc Fri Nov 07 12:20:06 2008 -0500 @@ -1689,16 +1689,21 @@ // Allocates a copy of orig_options in tables_ and stores it in the // descriptor. Remembers its uninterpreted options, to be interpreted // later. DescriptorT must be one of the Descriptor messages from // descriptor.proto. template<class DescriptorT> void AllocateOptions( const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor); + // Special-case overload for FileDescriptor + void AllocateOptions( + const FileDescriptor::OptionsType& orig_options, + FileDescriptor* descriptor); + // Implementation for AllocateOptions(). Don't call this directly. template<class DescriptorT> void AllocateOptionsImpl( const string& name_scope, const string& element_name, const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor); // These methods all have the same signature for the sake of the BUILD_ARRAY @@ -2202,18 +2207,18 @@ // FileDescriptor. template<class DescriptorT> void DescriptorBuilder::AllocateOptions( const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor) { AllocateOptionsImpl(descriptor->full_name(), descriptor- >full_name(), orig_options, descriptor); } -// We specialize for FileDescriptor. -template<> void DescriptorBuilder::AllocateOptions<FileDescriptor>( +// We overload FileDescriptor. +void DescriptorBuilder::AllocateOptions( const FileDescriptor::OptionsType& orig_options, FileDescriptor* descriptor) { // We add the dummy token so that LookupSymbol does the right thing. AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor- >name(), orig_options, descriptor); } template<class DescriptorT> void DescriptorBuilder::AllocateOptionsImpl( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---