Failure to generate compiled C++ buffer from tutorial

51 views
Skip to first unread message

Sean Trott

unread,
Aug 6, 2019, 5:47:05 PM8/6/19
to Protocol Buffers
Hello,

Apologies if this has been asked before, but I'm running into an issue trying to compile the protocol buffer from the tutorial: https://developers.google.com/protocol-buffers/docs/cpptutorial

I followed the make/make install / etc. instructions in src/README.md, then ran (in the directory):

 protoc --cpp_out=out examples/addressbook.proto 

(I didn't specify -I because I was running from the current directory, which contained examples.)

The tutorial indicates that I should see the following code in the resulting addressbook.pb.h:


 // name
 
inline bool has_name() const;
 
inline void clear_name();
 
inline const ::std::string& name() const;
 
inline void set_name(const ::std::string& value);
 
inline void set_name(const char* value);
 
inline ::std::string* mutable_name();

But I don't see anything like that in the file I generated (see attached). I'm not sure exactly what I'm doing wrong. Is there something obvious, or somewhere I should look to find out more?

Thank you! And please let me know if you need more information.

Sean

addressbook.pb.h
Reply all
Reply to author
Forward
0 new messages