Okay, thanks. I did not realize the syntax bit earlier. I wasn't exactly compiling that sample actually. I was compiling the AddressBook sample that came with the pre-built bin of ProtoC (and was modifying it based on the sample). That file did have the syntax explicitly set to proto3.
--Arpit On Saturday, September 24, 2016 at 7:44:29 AM UTC-7, Adam Cozzette wrote: > > When you create a .proto file you can set either syntax = "proto2"; or syntax > = "proto3"; at the top, and the protobuf compiler and runtime support > both (as long as you're using version 3.0 or higher). We are planning to > support both syntaxes indefinitely, both for backward compatibility and > because proto2 is still a good choice for new projects that require > features such as unknown fields that do not exist in proto3. > > What was the error message you saw? I tried compiling the example just now > and it worked just fine, although protoc did log a warning that I needed to > set the syntax. > > On Fri, Sep 23, 2016 at 8:43 PM, Arpit Baldeva <[email protected] > <javascript:>> wrote: > >> As a little background, I am a new user to protobuf. Naturally, I am >> trying latest releases. And I see no mention on the page that this syntax >> may not be supported in latest version. So it ends up being odd that the >> first example I see does not compile with latest release :). >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/protobuf. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
