protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.49k stars 15.46k forks source link

NEED HELP to compile *.pb.cc file #5796

Closed CDWJustin closed 5 years ago

CDWJustin commented 5 years ago

when I try to compile a c++ file with the protobuf, I met these errors which I have no idea why.... c++ test.cc assembly.pb.cc

In file included from test.cc:11:
In file included from ././assembly.pb.h:9:
/usr/local/include/google/protobuf/stubs/common.h:190:17: error: expected expression
  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
                ^
In file included from test.cc:11:
In file included from ././assembly.pb.h:25:
In file included from /usr/local/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /usr/local/include/google/protobuf/map.h:49:
In file included from /usr/local/include/google/protobuf/map_type_handler.h:34:
In file included from /usr/local/include/google/protobuf/parse_context.h:40:
In file included from /usr/local/include/google/protobuf/implicit_weak_message.h:37:
/usr/local/include/google/protobuf/message_lite.h:133:3: error: unknown type name 'constexpr'
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ^
/usr/local/include/google/protobuf/message_lite.h:133:13: error: expected member name or ';' after declaration specifiers
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ~~~~~~~~~ ^
/usr/local/include/google/protobuf/message_lite.h:126:11: error: use of undeclared identifier 'union_'
    new (&union_) T();
          ^
/usr/local/include/google/protobuf/message_lite.h:130:5: error: use of undeclared identifier 'get_mutable'
    get_mutable()->~T();
    ^
/usr/local/include/google/protobuf/message_lite.h:147:45: error: found '<::' after a template name which forms the digraph '<:'
      (aka '[') and a ':', did you mean '< ::'?
PROTOBUF_EXPORT extern ExplicitlyConstructed<::std::string>
                                            ^
/usr/local/include/google/protobuf/message_lite.h:152:37: error: no member named 'get' in
      'google::protobuf::internal::ExplicitlyConstructed<std::__1::basic_string<char> >'
  return fixed_address_empty_string.get();
         ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/include/google/protobuf/message_lite.h:508:3: error: unknown type name 'constexpr'
  constexpr bool alias = flags & kMergeWithAliasing;
  ^
/usr/local/include/google/protobuf/message_lite.h:508:13: error: expected unqualified-id
  constexpr bool alias = flags & kMergeWithAliasing;
            ^
/usr/local/include/google/protobuf/message_lite.h:509:45: error: use of undeclared identifier 'alias'
  bool res = internal::MergePartialFromImpl<alias>(input, this);
                                            ^
In file included from test.cc:11:
In file included from ././assembly.pb.h:25:
In file included from /usr/local/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /usr/local/include/google/protobuf/map.h:49:
In file included from /usr/local/include/google/protobuf/map_type_handler.h:34:
In file included from /usr/local/include/google/protobuf/parse_context.h:42:
/usr/local/include/google/protobuf/repeated_field.h:131:39: error: expected ';' at end of declaration list
  RepeatedField(RepeatedField&& other) noexcept;
                                      ^
/usr/local/include/google/protobuf/repeated_field.h:132:50: error: expected ';' at end of declaration list
  RepeatedField& operator=(RepeatedField&& other) noexcept;
                                                 ^
/usr/local/include/google/protobuf/repeated_field.h:804:45: error: expected ';' at end of declaration list
  RepeatedPtrField(RepeatedPtrField&& other) noexcept;
                                            ^
/usr/local/include/google/protobuf/repeated_field.h:805:56: error: expected ';' at end of declaration list
  RepeatedPtrField& operator=(RepeatedPtrField&& other) noexcept;
                                                       ^
/usr/local/include/google/protobuf/repeated_field.h:1126:68: error: expected ';' at end of declaration
inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
                                                                   ^
/usr/local/include/google/protobuf/repeated_field.h:1126:69: error: unknown type name 'noexcept'
inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
                                                                    ^
/usr/local/include/google/protobuf/repeated_field.h:1127:5: error: expected unqualified-id
    : RepeatedField() {
    ^
/usr/local/include/google/protobuf/repeated_field.h:1139:27: error: expected ';' at end of declaration
    RepeatedField&& other) noexcept {
                          ^
/usr/local/include/google/protobuf/repeated_field.h:1139:28: error: C++ requires a type specifier for all declarations
    RepeatedField&& other) noexcept {
                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
In file included from assembly.pb.cc:4:
In file included from ./assembly.pb.h:9:
/usr/local/include/google/protobuf/stubs/common.h:190:17: error: expected expression
  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
                ^
In file included from assembly.pb.cc:4:
In file included from ./assembly.pb.h:25:
In file included from /usr/local/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /usr/local/include/google/protobuf/map.h:49:
In file included from /usr/local/include/google/protobuf/map_type_handler.h:34:
In file included from /usr/local/include/google/protobuf/parse_context.h:40:
In file included from /usr/local/include/google/protobuf/implicit_weak_message.h:37:
/usr/local/include/google/protobuf/message_lite.h:133:3: error: unknown type name 'constexpr'
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ^
/usr/local/include/google/protobuf/message_lite.h:133:13: error: expected member name or ';' after declaration specifiers
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ~~~~~~~~~ ^
/usr/local/include/google/protobuf/message_lite.h:126:11: error: use of undeclared identifier 'union_'
    new (&union_) T();
          ^
/usr/local/include/google/protobuf/message_lite.h:130:5: error: use of undeclared identifier 'get_mutable'
    get_mutable()->~T();
    ^
/usr/local/include/google/protobuf/message_lite.h:147:45: error: found '<::' after a template name which forms the digraph '<:'
      (aka '[') and a ':', did you mean '< ::'?
PROTOBUF_EXPORT extern ExplicitlyConstructed<::std::string>
                                            ^
/usr/local/include/google/protobuf/message_lite.h:152:37: error: no member named 'get' in
      'google::protobuf::internal::ExplicitlyConstructed<std::__1::basic_string<char> >'
  return fixed_address_empty_string.get();
         ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/include/google/protobuf/message_lite.h:508:3: error: unknown type name 'constexpr'
  constexpr bool alias = flags & kMergeWithAliasing;
  ^
/usr/local/include/google/protobuf/message_lite.h:508:13: error: expected unqualified-id
  constexpr bool alias = flags & kMergeWithAliasing;
            ^
/usr/local/include/google/protobuf/message_lite.h:509:45: error: use of undeclared identifier 'alias'
  bool res = internal::MergePartialFromImpl<alias>(input, this);
                                            ^
In file included from assembly.pb.cc:4:
In file included from ./assembly.pb.h:25:
In file included from /usr/local/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /usr/local/include/google/protobuf/map.h:49:
In file included from /usr/local/include/google/protobuf/map_type_handler.h:34:
In file included from /usr/local/include/google/protobuf/parse_context.h:42:
/usr/local/include/google/protobuf/repeated_field.h:131:39: error: expected ';' at end of declaration list
  RepeatedField(RepeatedField&& other) noexcept;
                                      ^
/usr/local/include/google/protobuf/repeated_field.h:132:50: error: expected ';' at end of declaration list
  RepeatedField& operator=(RepeatedField&& other) noexcept;
                                                 ^
/usr/local/include/google/protobuf/repeated_field.h:804:45: error: expected ';' at end of declaration list
  RepeatedPtrField(RepeatedPtrField&& other) noexcept;
                                            ^
/usr/local/include/google/protobuf/repeated_field.h:805:56: error: expected ';' at end of declaration list
  RepeatedPtrField& operator=(RepeatedPtrField&& other) noexcept;
                                                       ^
/usr/local/include/google/protobuf/repeated_field.h:1126:68: error: expected ';' at end of declaration
inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
                                                                   ^
/usr/local/include/google/protobuf/repeated_field.h:1126:69: error: unknown type name 'noexcept'
inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
                                                                    ^
/usr/local/include/google/protobuf/repeated_field.h:1127:5: error: expected unqualified-id
    : RepeatedField() {
    ^
/usr/local/include/google/protobuf/repeated_field.h:1139:27: error: expected ';' at end of declaration
    RepeatedField&& other) noexcept {
                          ^
/usr/local/include/google/protobuf/repeated_field.h:1139:28: error: C++ requires a type specifier for all declarations
    RepeatedField&& other) noexcept {
                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
acozzette commented 5 years ago

It looks like your compiler is generating errors because it doesn't recognize C++11 features we're using. You can try passing -std=c++11, and if that doesn't work then you may need a newer compiler.

CDWJustin commented 5 years ago

Thanks for the prompt reply! I tried this one g++ -Wall -g -std=c++11 -c assembly.pb.cc, but it seems still not working. What do you mean by need a new compiler?

acozzette commented 5 years ago

If I remember right, the earliest version of GCC we support is 4.8, so I am guessing you are using something earlier than that. If you upgrade to a newer version of GCC then it should work, though.

rdhafidh commented 5 years ago

same here tried g++ -c proto\addressbook.pb.cc -I. -IC:\build\mingw8_32\opt\include -std=gnu++1z generated this error

In file included from proto\addressbook.pb.cc:4:
./proto/addressbook.pb.h:157:30: error: 'google::protobuf::uint8* tutorial::Person_PhoneNumber::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./proto/addressbook.pb.h:275:30: error: 'google::protobuf::uint8* tutorial::Person::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./proto/addressbook.pb.h:464:30: error: 'google::protobuf::uint8* tutorial::AddressBook::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:23:8: error: 'PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto' does not name a type; did you mean 'PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto'?
 extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto
proto\addressbook.pb.cc:75:56: error: 'scc_info_Timestamp' is not a member of 'protobuf_google_2fprotobuf_2ftimestamp_2eproto'
       &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,}};
                                                        ^~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:101:57: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:126:70: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In function 'void protobuf_proto_2faddressbook_2eproto::protobuf_AssignDescriptors()':
proto\addressbook.pb.cc:141:34: error: 'schemas' was not declared in this scope
       "proto/addressbook.proto", schemas, file_default_instances, TableStruct::offsets,
                                  ^~~~~~~
proto\addressbook.pb.cc:140:3: error: 'AssignDescriptors' was not declared in this scope
   AssignDescriptors(
   ^~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:140:3: note: suggested alternative:
In file included from proto\addressbook.pb.cc:13:
C:\build\mingw8_32\opt\include/google/protobuf/generated_message_reflection.h:701:22: note:   'google::protobuf::internal::AssignDescriptors'
 void PROTOBUF_EXPORT AssignDescriptors(AssignDescriptorsTable* table);
                      ^~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: At global scope:
proto\addressbook.pb.cc:150:51: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_COLD'
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In function 'void protobuf_proto_2faddressbook_2eproto::protobuf_RegisterTypes(const string&)':
proto\addressbook.pb.cc:153:33: error: 'RegisterAllTypes' is not a member of 'google::protobuf::internal'
   ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
                                 ^~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:153:33: note: suggested alternative: 'RegisterAllTypesInternal'
   ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
                                 ^~~~~~~~~~~~~~~~
                                 RegisterAllTypesInternal
proto\addressbook.pb.cc: In function 'void protobuf_proto_2faddressbook_2eproto::AddDescriptorsImpl()':
proto\addressbook.pb.cc:158:34: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:173:7: error: 'descriptor' was not declared in this scope
       descriptor, 473);
       ^~~~~~~~~~
proto\addressbook.pb.cc:173:7: note: suggested alternative: 'AddDescriptors'
       descriptor, 473);
       ^~~~~~~~~~
       AddDescriptors
proto\addressbook.pb.cc:175:32: error: invalid conversion from 'void (*)(const string&)' {aka 'void (*)(const std::__cxx11::basic_string<char>&)'} to 'void*' [-fpermissive]
     "proto/addressbook.proto", &protobuf_RegisterTypes);
                                ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./proto/addressbook.pb.h:29,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/message.h:1112:51: note:   initializing argument 2 of 'static void google::protobuf::MessageFactory::InternalRegisterGeneratedFile(const char*, void*)'
                                             void* assign_descriptors_table);
                                             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:176:53: error: 'AddDescriptors' is not a member of 'protobuf_google_2fprotobuf_2ftimestamp_2eproto'
   ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
                                                     ^~~~~~~~~~~~~~
proto\addressbook.pb.cc:176:53: note: suggested alternatives:
In file included from proto\addressbook.pb.cc:4:
./proto/addressbook.pb.h:48:6: note:   'protobuf_proto_2faddressbook_2eproto::AddDescriptors'
 void AddDescriptors();
      ^~~~~~~~~~~~~~
In file included from proto\addressbook.pb.cc:13:
C:\build\mingw8_32\opt\include/google/protobuf/generated_message_reflection.h:712:22: note:   'google::protobuf::internal::AddDescriptors'
 void PROTOBUF_EXPORT AddDescriptors(DescriptorTable* table,
                      ^~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual bool tutorial::Person_PhoneNumber::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
proto\addressbook.pb.cc:284:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:296:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:284:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:296:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:284:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:298:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:284:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:298:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:284:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:313:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
proto\addressbook.pb.cc:284:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:313:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
proto\addressbook.pb.cc:284:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:328:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc:284:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:328:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::Person_PhoneNumber::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
proto\addressbook.pb.cc:365:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:367:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'google::protobuf::uint8* tutorial::Person_PhoneNumber::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
proto\addressbook.pb.cc:396:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:398:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual size_t tutorial::Person_PhoneNumber::ByteSizeLong() const':
proto\addressbook.pb.cc:408:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:411:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::Person_PhoneNumber::MergeFrom(const google::protobuf::Message&)':
proto\addressbook.pb.cc:435:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Person_PhoneNumber>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:435:37: note: suggested alternative:
In file included from ./proto/addressbook.pb.h:29,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:435:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Person_PhoneNumber>(
                                                            ^~~~~
proto\addressbook.pb.cc: In member function 'virtual bool tutorial::Person::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:611:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:611:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:613:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:613:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:628:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:628:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:641:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:641:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:643:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:643:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:657:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:657:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:669:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:669:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:599:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:682:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc:599:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:682:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::Person::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
proto\addressbook.pb.cc:743:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:745:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'google::protobuf::uint8* tutorial::Person::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
proto\addressbook.pb.cc:789:68: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const tutorial::Person_PhoneNumber&, bool&, google::protobuf::uint8*&)'
         4, this->phones(static_cast<int>(i)), deterministic, target);
                                                                    ^
In file included from C:\build\mingw8_32\opt\include/google/protobuf/parse_context.h:43,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map_type_handler.h:34,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map.h:49,
                 from C:\build\mingw8_32\opt\include/google/protobuf/generated_message_table_driven.h:34,
                 from ./proto/addressbook.pb.h:25,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
proto\addressbook.pb.cc:789:68: note:   candidate expects 3 arguments, 4 provided
         4, this->phones(static_cast<int>(i)), deterministic, target);
                                                                    ^
proto\addressbook.pb.cc:796:65: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const google::protobuf::Timestamp&, bool&, google::protobuf::uint8*&)'
         5, this->_internal_last_updated(), deterministic, target);
                                                                 ^
In file included from C:\build\mingw8_32\opt\include/google/protobuf/parse_context.h:43,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map_type_handler.h:34,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map.h:49,
                 from C:\build\mingw8_32\opt\include/google/protobuf/generated_message_table_driven.h:34,
                 from ./proto/addressbook.pb.h:25,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
proto\addressbook.pb.cc:796:65: note:   candidate expects 3 arguments, 4 provided
         5, this->_internal_last_updated(), deterministic, target);
                                                                 ^
proto\addressbook.pb.cc:799:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:801:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual size_t tutorial::Person::ByteSizeLong() const':
proto\addressbook.pb.cc:811:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:814:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::Person::MergeFrom(const google::protobuf::Message&)':
proto\addressbook.pb.cc:864:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Person>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:864:37: note: suggested alternative:
In file included from ./proto/addressbook.pb.h:29,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:864:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Person>(
                                                            ^~~~~
proto\addressbook.pb.cc: In member function 'virtual bool tutorial::AddressBook::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
proto\addressbook.pb.cc:999:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1011:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:999:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1011:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
proto\addressbook.pb.cc:999:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1024:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc:999:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1024:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::AddressBook::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
proto\addressbook.pb.cc:1054:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1056:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'google::protobuf::uint8* tutorial::AddressBook::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
proto\addressbook.pb.cc:1073:68: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const tutorial::Person&, bool&, google::protobuf::uint8*&)'
         1, this->people(static_cast<int>(i)), deterministic, target);
                                                                    ^
In file included from C:\build\mingw8_32\opt\include/google/protobuf/parse_context.h:43,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map_type_handler.h:34,
                 from C:\build\mingw8_32\opt\include/google/protobuf/map.h:49,
                 from C:\build\mingw8_32\opt\include/google/protobuf/generated_message_table_driven.h:34,
                 from ./proto/addressbook.pb.h:25,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\build\mingw8_32\opt\include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
proto\addressbook.pb.cc:1073:68: note:   candidate expects 3 arguments, 4 provided
         1, this->people(static_cast<int>(i)), deterministic, target);
                                                                    ^
proto\addressbook.pb.cc:1076:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1078:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual size_t tutorial::AddressBook::ByteSizeLong() const':
proto\addressbook.pb.cc:1088:84: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1091:40: error: 'GetProto3PreserveUnknownsDefault' is not a member of 'google::protobuf::internal'
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc: In member function 'virtual void tutorial::AddressBook::MergeFrom(const google::protobuf::Message&)':
proto\addressbook.pb.cc:1113:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const AddressBook>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1113:37: note: suggested alternative:
In file included from ./proto/addressbook.pb.h:29,
                 from proto\addressbook.pb.cc:4:
C:\build\mingw8_32\opt\include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
proto\addressbook.pb.cc:1113:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const AddressBook>(
                                                            ^~~~~
proto\addressbook.pb.cc: At global scope:
proto\addressbook.pb.cc:1172:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tutorial::Person_PhoneNumber* Arena::CreateMaybeMessage< ::tutorial::Person_PhoneNumber >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
proto\addressbook.pb.cc:1175:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tutorial::Person* Arena::CreateMaybeMessage< ::tutorial::Person >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
proto\addressbook.pb.cc:1178:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tutorial::AddressBook* Arena::CreateMaybeMessage< ::tutorial::AddressBook >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN

my gcc version:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/build/mingw8_32/bin/../libexec/gcc/i686-w64-mingw32/8.1.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-8.1.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/i686-w64-mingw32-static --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/include -I/c/mingw810/prerequisites/i686-zlib-static/include -I/c/mingw810/prerequisites/i686-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/i686-810-posix-dwarf-rt_v6-rev0/mingw32/opt/lib -L/c/mingw810/prerequisites/i686-zlib-static/lib -L/c/mingw810/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
Thread model: posix
gcc version 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 

my protobuf version is in the master branch. Is this protoc generated code issue?

CDWJustin commented 5 years ago

Yes, I upgrade the gcc to gcc version 8.3.0 (Homebrew GCC 8.3.0) But it just generate new compiler error.

g++-8 -Wall -g -std=c++14 -c assembly.pb.cc
In file included from assembly.pb.cc:4:
assembly.pb.h:187:30: error: 'google::protobuf::uint8* assembly::Storage::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:304:30: error: 'google::protobuf::uint8* assembly::Document::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:436:30: error: 'google::protobuf::uint8* assembly::OnshapeInfo::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:576:30: error: 'google::protobuf::uint8* assembly::Model::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:728:30: error: 'google::protobuf::uint8* assembly::Assembly::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:858:30: error: 'google::protobuf::uint8* assembly::Part::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:980:30: error: 'google::protobuf::uint8* assembly::ModelPair::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.h:1112:30: error: 'google::protobuf::uint8* assembly::Connection::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const' marked 'final', but is not virtual
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:185:57: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:257:70: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc: In function 'void protobuf_assembly_2eproto::protobuf_AssignDescriptors()':
assembly.pb.cc:282:25: error: 'schemas' was not declared in this scope
       "assembly.proto", schemas, file_default_instances, TableStruct::offsets,
                         ^~~~~~~
assembly.pb.cc:281:3: error: 'AssignDescriptors' was not declared in this scope
   AssignDescriptors(
   ^~~~~~~~~~~~~~~~~
assembly.pb.cc:281:3: note: suggested alternative:
In file included from assembly.pb.cc:13:
/usr/local/include/google/protobuf/generated_message_reflection.h:701:22: note:   'google::protobuf::internal::AssignDescriptors'
 void PROTOBUF_EXPORT AssignDescriptors(AssignDescriptorsTable* table);
                      ^~~~~~~~~~~~~~~~~
assembly.pb.cc: At global scope:
assembly.pb.cc:291:51: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_COLD'
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc: In function 'void protobuf_assembly_2eproto::protobuf_RegisterTypes(const string&)':
assembly.pb.cc:294:33: error: 'RegisterAllTypes' is not a member of 'google::protobuf::internal'
   ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
                                 ^~~~~~~~~~~~~~~~
assembly.pb.cc:294:33: note: suggested alternative: 'RegisterAllTypesInternal'
   ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
                                 ^~~~~~~~~~~~~~~~
                                 RegisterAllTypesInternal
assembly.pb.cc: In function 'void protobuf_assembly_2eproto::AddDescriptorsImpl()':
assembly.pb.cc:299:34: error: expected initializer before 'GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE'
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:320:7: error: 'descriptor' was not declared in this scope
       descriptor, 684);
       ^~~~~~~~~~
assembly.pb.cc:320:7: note: suggested alternative: 'AddDescriptors'
       descriptor, 684);
       ^~~~~~~~~~
       AddDescriptors
assembly.pb.cc:322:23: error: invalid conversion from 'void (*)(const string&)' {aka 'void (*)(const std::__cxx11::basic_string<char>&)'} to 'void*' [-fpermissive]
     "assembly.proto", &protobuf_RegisterTypes);
                       ^~~~~~~~~~~~~~~~~~~~~~~
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1112:51: note:   initializing argument 2 of 'static void google::protobuf::MessageFactory::InternalRegisterGeneratedFile(const char*, void*)'
                                             void* assign_descriptors_table);
                                             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Storage::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:435:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:447:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:435:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:447:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:435:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:460:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:435:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:460:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'google::protobuf::uint8* assembly::Storage::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
assembly.pb.cc:509:70: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Document&, bool&, google::protobuf::uint8*&)'
         1, this->document(static_cast<int>(i)), deterministic, target);
                                                                      ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:509:70: note:   candidate expects 3 arguments, 4 provided
         1, this->document(static_cast<int>(i)), deterministic, target);
                                                                      ^
assembly.pb.cc: In member function 'virtual void assembly::Storage::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:549:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Storage>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:549:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:549:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Storage>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Document::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:682:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:694:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:682:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:694:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:682:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:706:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:682:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:706:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:682:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:719:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:682:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:719:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'google::protobuf::uint8* assembly::Document::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
assembly.pb.cc:775:57: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::OnshapeInfo&, bool&, google::protobuf::uint8*&)'
         1, this->_internal_info(), deterministic, target);
                                                         ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:775:57: note:   candidate expects 3 arguments, 4 provided
         1, this->_internal_info(), deterministic, target);
                                                         ^
assembly.pb.cc:783:66: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Model&, bool&, google::protobuf::uint8*&)'
         2, this->root(static_cast<int>(i)), deterministic, target);
                                                                  ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:783:66: note:   candidate expects 3 arguments, 4 provided
         2, this->root(static_cast<int>(i)), deterministic, target);
                                                                  ^
assembly.pb.cc: In member function 'virtual void assembly::Document::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:830:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Document>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:830:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:830:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Document>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::OnshapeInfo::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:972:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:984:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:972:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:984:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:972:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1000:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:972:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1000:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:972:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1017:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:972:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1017:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'virtual void assembly::OnshapeInfo::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:1138:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const OnshapeInfo>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1138:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1138:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const OnshapeInfo>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Model::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:1308:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1320:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:1308:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1320:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:1308:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1336:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1308:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1336:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1308:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1348:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1308:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1348:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1308:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1361:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:1308:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1361:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'google::protobuf::uint8* assembly::Model::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
assembly.pb.cc:1435:61: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Assembly&, bool&, google::protobuf::uint8*&)'
         2, this->_internal_assembly(), deterministic, target);
                                                             ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:1435:61: note:   candidate expects 3 arguments, 4 provided
         2, this->_internal_assembly(), deterministic, target);
                                                             ^
assembly.pb.cc:1442:57: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Part&, bool&, google::protobuf::uint8*&)'
         3, this->_internal_part(), deterministic, target);
                                                         ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:1442:57: note:   candidate expects 3 arguments, 4 provided
         3, this->_internal_part(), deterministic, target);
                                                         ^
assembly.pb.cc: In member function 'virtual void assembly::Model::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:1494:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Model>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1494:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1494:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Model>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Assembly::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:1630:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1642:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1630:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1642:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1630:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1654:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1630:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1654:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:1630:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1667:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:1630:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1667:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'google::protobuf::uint8* assembly::Assembly::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
assembly.pb.cc:1725:70: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::ModelPair&, bool&, google::protobuf::uint8*&)'
         1, this->children(static_cast<int>(i)), deterministic, target);
                                                                      ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:1725:70: note:   candidate expects 3 arguments, 4 provided
         1, this->children(static_cast<int>(i)), deterministic, target);
                                                                      ^
assembly.pb.cc:1733:67: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Connection&, bool&, google::protobuf::uint8*&)'
         2, this->mates(static_cast<int>(i)), deterministic, target);
                                                                   ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:1733:67: note:   candidate expects 3 arguments, 4 provided
         2, this->mates(static_cast<int>(i)), deterministic, target);
                                                                   ^
assembly.pb.cc: In member function 'virtual void assembly::Assembly::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:1784:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Assembly>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1784:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1784:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Assembly>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Part::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:1912:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1924:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:1912:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1924:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:1912:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1941:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:1912:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:1941:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'virtual void assembly::Part::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:2032:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Part>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2032:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2032:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Part>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::ModelPair::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:2169:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2181:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:2169:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2181:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
           ^~~
assembly.pb.cc:2169:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2193:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
           ^~~
assembly.pb.cc:2169:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2193:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
           ^~~
assembly.pb.cc:2169:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2199:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
           ^~~
assembly.pb.cc:2169:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2199:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
           ^~~
assembly.pb.cc:2169:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2213:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:2169:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2213:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'google::protobuf::uint8* assembly::ModelPair::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
assembly.pb.cc:2266:58: error: no matching function for call to 'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const assembly::Model&, bool&, google::protobuf::uint8*&)'
         3, this->_internal_model(), deterministic, target);
                                                          ^
In file included from /usr/local/include/google/protobuf/parse_context.h:43,
                 from /usr/local/include/google/protobuf/map_type_handler.h:34,
                 from /usr/local/include/google/protobuf/map.h:49,
                 from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                 from assembly.pb.h:25,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note: candidate: 'template<class MessageType> static google::protobuf::uint8* google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray(int, const MessageType&, google::protobuf::uint8*)'
   INL static uint8* InternalWriteMessageToArray(int field_number,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/wire_format_lite.h:627:21: note:   template argument deduction/substitution failed:
assembly.pb.cc:2266:58: note:   candidate expects 3 arguments, 4 provided
         3, this->_internal_model(), deterministic, target);
                                                          ^
assembly.pb.cc: In member function 'virtual void assembly::ModelPair::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:2315:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const ModelPair>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2315:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2315:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const ModelPair>(
                                                            ^~~~~
assembly.pb.cc: In member function 'virtual bool assembly::Connection::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
assembly.pb.cc:2441:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2453:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:2441:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2453:11: note: in expansion of macro 'DO_'
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
           ^~~
assembly.pb.cc:2441:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2471:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
assembly.pb.cc:2441:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2471:11: note: in expansion of macro 'DO_'
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
           ^~~
assembly.pb.cc:2441:30: error: 'GOOGLE_PREDICT_TRUE' was not declared in this scope
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2491:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc:2441:30: note: suggested alternative: 'GOOGLE_CHECK_GE'
 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
                              ^~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2491:9: note: in expansion of macro 'DO_'
         DO_(::google::protobuf::internal::WireFormat::SkipField(
         ^~~
assembly.pb.cc: In member function 'virtual void assembly::Connection::MergeFrom(const google::protobuf::Message&)':
assembly.pb.cc:2600:37: error: 'DynamicCastToGenerated' is not a member of 'google::protobuf::internal'
       ::google::protobuf::internal::DynamicCastToGenerated<const Connection>(
                                     ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2600:37: note: suggested alternative:
In file included from assembly.pb.h:29,
                 from assembly.pb.cc:4:
/usr/local/include/google/protobuf/message.h:1172:4: note:   'google::protobuf::DynamicCastToGenerated'
 T* DynamicCastToGenerated(Message* from) {
    ^~~~~~~~~~~~~~~~~~~~~~
assembly.pb.cc:2600:60: error: expected primary-expression before 'const'
       ::google::protobuf::internal::DynamicCastToGenerated<const Connection>(
                                                            ^~~~~
assembly.pb.cc: At global scope:
assembly.pb.cc:2664:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Storage* Arena::CreateMaybeMessage< ::assembly::Storage >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2667:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Document* Arena::CreateMaybeMessage< ::assembly::Document >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2670:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::OnshapeInfo* Arena::CreateMaybeMessage< ::assembly::OnshapeInfo >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2673:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Model* Arena::CreateMaybeMessage< ::assembly::Model >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2676:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Assembly* Arena::CreateMaybeMessage< ::assembly::Assembly >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2679:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Part* Arena::CreateMaybeMessage< ::assembly::Part >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2682:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::ModelPair* Arena::CreateMaybeMessage< ::assembly::ModelPair >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
assembly.pb.cc:2685:12: error: 'GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE' does not name a type; did you mean 'GOOGLE_PROTOBUF_ASSERT_RETURN'?
 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::assembly::Connection* Arena::CreateMaybeMessage< ::assembly::Connection >(Arena* arena) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            GOOGLE_PROTOBUF_ASSERT_RETURN
make: *** [assembly.pb.o] Error 1
acozzette commented 5 years ago

We have not tested with -std=c++14 because we're currently focusing on C++11, so that may be part of the problem (we should fix that soon, though). I think those errors are also detecting a real bug which is that we are marking the generated member function InternalSerializeWithCachedSizesToArray as final even though it's not virtual. Let me send out a fix for that.

acozzette commented 5 years ago

Actually I realized I was mistaken about InternalSerializeWithCachedSizesToArray--that member function is virtual and overrides the implementation on google::protobuf::MessageLite, so I don't quite understand what the error is about. But if you don't mind could you try building with -std=c++11 just to narrow down the problem?

CDWJustin commented 5 years ago

It seems that it can compile the assembly.pb.cc file, but when I link test.o and assembly.pb.o to output the executable, it shows these error... g++ -Wall -g -std=c++11 -c test.cc g++ -Wall -g -std=c++11 -c assembly.pb.cc g++ test.o assembly.pb.o -o test

Undefined symbols for architecture x86_64:
  "google::protobuf::RepeatedField<double>::InternalSwap(google::protobuf::RepeatedField<double>*)", referenced from:
      assembly::ModelPair::InternalSwap(assembly::ModelPair*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::mutable_data()", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::AddAlreadyReserved(double const&)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(int, unsigned int, google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Add(double const&)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(int, unsigned int, google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Clear()", referenced from:
      assembly::ModelPair::Clear() in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Resize(int, double const&)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Truncate(int)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::MergeFrom(google::protobuf::RepeatedField<double> const&)", referenced from:
      assembly::ModelPair::MergeFrom(assembly::ModelPair const&) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::RepeatedField(google::protobuf::RepeatedField<double> const&)", referenced from:
      assembly::ModelPair::ModelPair(assembly::ModelPair const&) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::RepeatedField()", referenced from:
      assembly::ModelPair::ModelPair() in assembly.pb.o
  "google::protobuf::RepeatedField<double>::~RepeatedField()", referenced from:
      assembly::ModelPair::ModelPair() in assembly.pb.o
      assembly::ModelPair::ModelPair(assembly::ModelPair const&) in assembly.pb.o
      assembly::ModelPair::~ModelPair() in assembly.pb.o
  "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from:
      google::protobuf::UnknownFieldSet::Clear() in assembly.pb.o
  "google::protobuf::UnknownFieldSet::default_instance()", referenced from:
      google::protobuf::internal::InternalMetadataWithArena::default_instance() in assembly.pb.o
  "google::protobuf::UnknownFieldSet::AddVarint(int, unsigned long long)", referenced from:
      assembly::Connection::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
  "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from:
      google::protobuf::internal::InternalMetadataWithArena::DoMergeFrom(google::protobuf::UnknownFieldSet const&) in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Add()", referenced from:
      assembly::Connection::add_modelid() in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Clear()", referenced from:
      assembly::Connection::Clear() in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::MergeFrom(google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&)", referenced from:
      assembly::Connection::MergeFrom(assembly::Connection const&) in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::RepeatedPtrField(google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&)", referenced from:
      assembly::Connection::Connection(assembly::Connection const&) in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::RepeatedPtrField()", referenced from:
      assembly::Connection::Connection() in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::~RepeatedPtrField()", referenced from:
      assembly::Connection::Connection() in assembly.pb.o
      assembly::Connection::Connection(assembly::Connection const&) in assembly.pb.o
      assembly::Connection::~Connection() in assembly.pb.o
  "google::protobuf::io::CodedInputStream::SkipFallback(int, int)", referenced from:
      google::protobuf::io::CodedInputStream::Skip(int) in assembly.pb.o
  "google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)", referenced from:
      assembly::Storage::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Document::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::OnshapeInfo::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Model::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Assembly::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Part::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::ModelPair::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      ...
  "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from:
      google::protobuf::io::CodedInputStream::ReadVarint32(unsigned int*) in assembly.pb.o
  "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long*)", referenced from:
      google::protobuf::io::CodedInputStream::ReadLittleEndian64(unsigned long long*) in assembly.pb.o
  "google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntFallback()", referenced from:
      google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int*) in assembly.pb.o
  "google::protobuf::io::CodedInputStream::DecrementRecursionDepthAndPopLimit(int)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Document>(google::protobuf::io::CodedInputStream*, assembly::Document*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::OnshapeInfo>(google::protobuf::io::CodedInputStream*, assembly::OnshapeInfo*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Model>(google::protobuf::io::CodedInputStream*, assembly::Model*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Assembly>(google::protobuf::io::CodedInputStream*, assembly::Assembly*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Part>(google::protobuf::io::CodedInputStream*, assembly::Part*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::ModelPair>(google::protobuf::io::CodedInputStream*, assembly::ModelPair*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Connection>(google::protobuf::io::CodedInputStream*, assembly::Connection*) in assembly.pb.o
      ...
  "google::protobuf::io::CodedInputStream::IncrementRecursionDepthAndPushLimit(int)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Document>(google::protobuf::io::CodedInputStream*, assembly::Document*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::OnshapeInfo>(google::protobuf::io::CodedInputStream*, assembly::OnshapeInfo*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Model>(google::protobuf::io::CodedInputStream*, assembly::Model*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Assembly>(google::protobuf::io::CodedInputStream*, assembly::Assembly*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Part>(google::protobuf::io::CodedInputStream*, assembly::Part*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::ModelPair>(google::protobuf::io::CodedInputStream*, assembly::ModelPair*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadMessage<assembly::Connection>(google::protobuf::io::CodedInputStream*, assembly::Connection*) in assembly.pb.o
      ...
  "google::protobuf::io::CodedInputStream::ReadRaw(void*, int)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned char*)", referenced from:
      google::protobuf::internal::WireFormatLite::WriteStringToArray(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned char*) in assembly.pb.o
  "google::protobuf::Message::DiscardUnknownFields()", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from:
      assembly::Storage::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Storage::MergeFrom(assembly::Storage const&) in assembly.pb.o
      google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*) in assembly.pb.o
      assembly::Document::Clear() in assembly.pb.o
      assembly::Document::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Document::MergeFrom(assembly::Document const&) in assembly.pb.o
      assembly::OnshapeInfo::MergeFrom(assembly::OnshapeInfo const&) in assembly.pb.o
      ...
  "google::protobuf::internal::LogMessage::~LogMessage()", referenced from:
      assembly::Storage::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Storage::MergeFrom(assembly::Storage const&) in assembly.pb.o
      google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*) in assembly.pb.o
      assembly::Document::Clear() in assembly.pb.o
      assembly::Document::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Document::MergeFrom(assembly::Document const&) in assembly.pb.o
      assembly::OnshapeInfo::MergeFrom(assembly::OnshapeInfo const&) in assembly.pb.o
      ...
  "google::protobuf::internal::LogMessage::operator<<(char const*)", referenced from:
      assembly::Storage::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Storage::MergeFrom(assembly::Storage const&) in assembly.pb.o
      google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*) in assembly.pb.o
      assembly::Document::Clear() in assembly.pb.o
      assembly::Document::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Document::MergeFrom(assembly::Document const&) in assembly.pb.o
      assembly::OnshapeInfo::MergeFrom(assembly::OnshapeInfo const&) in assembly.pb.o
      ...
  "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::Storage::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Document::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::OnshapeInfo::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Model::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Assembly::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Part::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::ModelPair::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      ...
  "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from:
      assembly::Storage::ByteSizeLong() const in assembly.pb.o
      assembly::Document::ByteSizeLong() const in assembly.pb.o
      assembly::OnshapeInfo::ByteSizeLong() const in assembly.pb.o
      assembly::Model::ByteSizeLong() const in assembly.pb.o
      assembly::Assembly::ByteSizeLong() const in assembly.pb.o
      assembly::Part::ByteSizeLong() const in assembly.pb.o
      assembly::ModelPair::ByteSizeLong() const in assembly.pb.o
      ...
  "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*)", referenced from:
      assembly::Storage::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::Document::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::OnshapeInfo::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::Model::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::Assembly::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::Part::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      assembly::ModelPair::InternalSerializeWithCachedSizesToArray(unsigned char*) const in assembly.pb.o
      ...
  "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::UnknownFieldSet*)", referenced from:
      assembly::Storage::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Document::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::OnshapeInfo::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Model::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Assembly::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::Part::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      assembly::ModelPair::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in assembly.pb.o
      ...
  "google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)", referenced from:
      google::protobuf::internal::InitSCC(google::protobuf::internal::SCCInfoBase*) in assembly.pb.o
  "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from:
      assembly::Storage::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Storage::MergeFrom(assembly::Storage const&) in assembly.pb.o
      google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*) in assembly.pb.o
      assembly::Document::Clear() in assembly.pb.o
      assembly::Document::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Document::MergeFrom(assembly::Document const&) in assembly.pb.o
      assembly::OnshapeInfo::MergeFrom(assembly::OnshapeInfo const&) in assembly.pb.o
      ...
  "google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*)", referenced from:
      google::protobuf::internal::OnShutdownDestroyMessage(void const*) in assembly.pb.o
  "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)", referenced from:
      assembly::Storage::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Document::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::OnshapeInfo::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Model::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Assembly::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::Part::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      assembly::ModelPair::MergeFrom(google::protobuf::Message const&) in assembly.pb.o
      ...
  "google::protobuf::internal::VerifyVersion(int, int, char const*)", referenced from:
      InitDefaultsStorage_assembly_2eproto() in assembly.pb.o
      InitDefaultsDocument_assembly_2eproto() in assembly.pb.o
      InitDefaultsOnshapeInfo_assembly_2eproto() in assembly.pb.o
      InitDefaultsAssembly_assembly_2eproto() in assembly.pb.o
      InitDefaultsPart_assembly_2eproto() in assembly.pb.o
      InitDefaultsConnection_assembly_2eproto() in assembly.pb.o
  "google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable*, void (* const*)(), int)", referenced from:
      AddDescriptors_assembly_2eproto() in assembly.pb.o
  "google::protobuf::internal::DestroyMessage(void const*)", referenced from:
      google::protobuf::internal::OnShutdownDestroyMessage(void const*) in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::ModelPair::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::WriteString(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::Connection::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*, int, google::protobuf::internal::WireFormatLite::Operation, char const*)", referenced from:
      google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*, int, google::protobuf::internal::WireFormat::Operation, char const*) in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::OnshapeInfo::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Model::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Part::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(int, google::protobuf::MessageLite const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::Storage::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Document::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Model::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::Assembly::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
      assembly::ModelPair::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)", referenced from:
      google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in assembly.pb.o
  "google::protobuf::internal::WireFormatLite::WriteEnum(int, int, google::protobuf::io::CodedOutputStream*)", referenced from:
      assembly::Connection::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in assembly.pb.o
  "google::protobuf::internal::AssignDescriptors(google::protobuf::internal::AssignDescriptorsTable*)", referenced from:
      assembly::Connection_MateType_descriptor() in assembly.pb.o
      assembly::Storage::GetMetadata() const in assembly.pb.o
      assembly::Document::GetMetadata() const in assembly.pb.o
      assembly::OnshapeInfo::GetMetadata() const in assembly.pb.o
      assembly::Model::GetMetadata() const in assembly.pb.o
      assembly::Assembly::GetMetadata() const in assembly.pb.o
      assembly::Part::GetMetadata() const in assembly.pb.o
      ...
  "google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)", referenced from:
      google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&, void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void**, void**, int, int)) in assembly.pb.o
  "google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)", referenced from:
      google::protobuf::RepeatedPtrField<assembly::Document>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<assembly::Document>::TypeHandler>(google::protobuf::RepeatedPtrField<assembly::Document>::TypeHandler::Type*) in assembly.pb.o
      google::protobuf::RepeatedPtrField<assembly::Model>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<assembly::Model>::TypeHandler>(google::protobuf::RepeatedPtrField<assembly::Model>::TypeHandler::Type*) in assembly.pb.o
      google::protobuf::RepeatedPtrField<assembly::ModelPair>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<assembly::ModelPair>::TypeHandler>(google::protobuf::RepeatedPtrField<assembly::ModelPair>::TypeHandler::Type*) in assembly.pb.o
      google::protobuf::RepeatedPtrField<assembly::Connection>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<assembly::Connection>::TypeHandler>(google::protobuf::RepeatedPtrField<assembly::Connection>::TypeHandler::Type*) in assembly.pb.o
  "google::protobuf::internal::fixed_address_empty_string", referenced from:
      google::protobuf::internal::GetEmptyStringAlreadyInited() in assembly.pb.o
  "google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned long)", referenced from:
      assembly::Storage* google::protobuf::Arena::CreateMaybeMessage<assembly::Storage>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Document* google::protobuf::Arena::CreateMaybeMessage<assembly::Document>(google::protobuf::Arena*) in assembly.pb.o
      assembly::OnshapeInfo* google::protobuf::Arena::CreateMaybeMessage<assembly::OnshapeInfo>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Model* google::protobuf::Arena::CreateMaybeMessage<assembly::Model>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Assembly* google::protobuf::Arena::CreateMaybeMessage<assembly::Assembly>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Part* google::protobuf::Arena::CreateMaybeMessage<assembly::Part>(google::protobuf::Arena*) in assembly.pb.o
      assembly::ModelPair* google::protobuf::Arena::CreateMaybeMessage<assembly::ModelPair>(google::protobuf::Arena*) in assembly.pb.o
      ...
  "google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void (*)(void*))", referenced from:
      assembly::Storage* google::protobuf::Arena::CreateMaybeMessage<assembly::Storage>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Document* google::protobuf::Arena::CreateMaybeMessage<assembly::Document>(google::protobuf::Arena*) in assembly.pb.o
      assembly::OnshapeInfo* google::protobuf::Arena::CreateMaybeMessage<assembly::OnshapeInfo>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Model* google::protobuf::Arena::CreateMaybeMessage<assembly::Model>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Assembly* google::protobuf::Arena::CreateMaybeMessage<assembly::Assembly>(google::protobuf::Arena*) in assembly.pb.o
      assembly::Part* google::protobuf::Arena::CreateMaybeMessage<assembly::Part>(google::protobuf::Arena*) in assembly.pb.o
      assembly::ModelPair* google::protobuf::Arena::CreateMaybeMessage<assembly::ModelPair>(google::protobuf::Arena*) in assembly.pb.o
      ...
  "google::protobuf::MessageLite::SerializeWithCachedSizesToArray(unsigned char*) const", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "google::protobuf::RepeatedField<double>::unsafe_data() const", referenced from:
      unsigned char* google::protobuf::internal::WireFormatLite::WritePrimitiveToArray<double>(int, google::protobuf::RepeatedField<double> const&, unsigned char* (*)(int, double, unsigned char*), unsigned char*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Get(int) const", referenced from:
      assembly::ModelPair::trans_cor(int) const in assembly.pb.o
  "google::protobuf::RepeatedField<double>::size() const", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(int, unsigned int, google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
      assembly::ModelPair::trans_cor_size() const in assembly.pb.o
      unsigned char* google::protobuf::internal::WireFormatLite::WritePrimitiveToArray<double>(int, google::protobuf::RepeatedField<double> const&, unsigned char* (*)(int, double, unsigned char*), unsigned char*) in assembly.pb.o
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedField<double>::Capacity() const", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(int, unsigned int, google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Get(int) const", referenced from:
      assembly::Connection::modelid(int) const in assembly.pb.o
  "google::protobuf::RepeatedPtrField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::size() const", referenced from:
      assembly::Connection::modelid_size() const in assembly.pb.o
  "google::protobuf::io::CodedInputStream::BytesUntilLimit() const", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::io::CodedInputStream::BytesUntilTotalBytesLimit() const", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<double, (google::protobuf::internal::WireFormatLite::FieldType)1>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<double>*) in assembly.pb.o
  "google::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const", referenced from:
      google::protobuf::Arena::AllocHook(std::type_info const*, unsigned long) const in assembly.pb.o
  "google::protobuf::Message::GetTypeName() const", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "google::protobuf::Message::SpaceUsedLong() const", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "google::protobuf::Message::InitializationErrorString() const", referenced from:
      vtable for assembly::Storage in assembly.pb.o
      vtable for assembly::Document in assembly.pb.o
      vtable for assembly::OnshapeInfo in assembly.pb.o
      vtable for assembly::Model in assembly.pb.o
      vtable for assembly::Assembly in assembly.pb.o
      vtable for assembly::Part in assembly.pb.o
      vtable for assembly::ModelPair in assembly.pb.o
      ...
  "typeinfo for google::protobuf::Message", referenced from:
      assembly::Storage const* google::protobuf::DynamicCastToGenerated<assembly::Storage>(google::protobuf::Message const*) in assembly.pb.o
      assembly::Document const* google::protobuf::DynamicCastToGenerated<assembly::Document>(google::protobuf::Message const*) in assembly.pb.o
      assembly::OnshapeInfo const* google::protobuf::DynamicCastToGenerated<assembly::OnshapeInfo>(google::protobuf::Message const*) in assembly.pb.o
      assembly::Model const* google::protobuf::DynamicCastToGenerated<assembly::Model>(google::protobuf::Message const*) in assembly.pb.o
      assembly::Assembly const* google::protobuf::DynamicCastToGenerated<assembly::Assembly>(google::protobuf::Message const*) in assembly.pb.o
      assembly::Part const* google::protobuf::DynamicCastToGenerated<assembly::Part>(google::protobuf::Message const*) in assembly.pb.o
      assembly::ModelPair const* google::protobuf::DynamicCastToGenerated<assembly::ModelPair>(google::protobuf::Message const*) in assembly.pb.o
      ...
  "vtable for google::protobuf::MessageLite", referenced from:
      google::protobuf::MessageLite::MessageLite() in assembly.pb.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "vtable for google::protobuf::Message", referenced from:
      google::protobuf::Message::Message() in assembly.pb.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [test] Error 1
acozzette commented 5 years ago

I think to fix the linker error you just need to add -lprotobuf to your command to link against the protobuf runtime.

CDWJustin commented 5 years ago

Cool, works then! Thanks a lot!

awdsxs123 commented 4 years ago

i use gcc4.9.4 ,and then get error const’ marked final, but is not virtual