undefined reference to google protobuf libraries.

mmmunir966
Posts: 12
Joined: Tue Feb 08, 2022 2:02 pm

undefined reference to google protobuf libraries.

Postby mmmunir966 » Thu Sep 15, 2022 4:10 pm

Hi,
My platform info:
MacBook M1 Pro,
esp-idf VS code plugin
protobuf 3.21.5
google libraries: /usr/local/include/google/protobuf/**

I am trying to integrate the google protocol buffers. I followed the steps mentioned in the esd-idf source directory on path esp-idf-master/components/protocomm
I am trying to build this tutorial https://developers.google.com/protocol- ... pptutorial.
I have written addressbook.proto file and generated the corresponding .cc and .h files for protobuf following instructions on link https://github.com/espressif/esp-idf/t ... comm/proto

It is built successfully by esp-idf platform when I don't include any example code in main.cpp.

I am getting undefined reference to error to all google protobuf libraries.

Code: Select all

FAILED: protobuf-tutorial.elf 
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZNK8tutorial18Person_PhoneNumber12ByteSizeLongEv+0x0): undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned int, google::protobuf::internal::CachedSize*) const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZNK8tutorial18Person_PhoneNumber11GetMetadataEv+0xc): undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'

/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZN8tutorial18Person_PhoneNumber9MergeImplERN6google8protobuf7MessageERKS3_+0x8): undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZN8tutorial6Person9MergeImplERN6google8protobuf7MessageERKS3_+0x8): undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZN8tutorial18Person_PhoneNumberD2Ev+0x4): undefined reference to `google::protobuf::internal::InternalMetadata::CheckedDestruct()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.literal._ZN8tutorial18Person_PhoneNumberD2Ev+0x8): undefined reference to `google::protobuf::internal::ArenaStringPtr::Destroy()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::ByteSizeLong() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:373: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned int, google::protobuf::internal::CachedSize*) const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::ByteSizeLong() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:714: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned int, google::protobuf::internal::CachedSize*) const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::AddressBook::ByteSizeLong() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:924: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned int, google::protobuf::internal::CachedSize*) const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::GetMetadata() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:431: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::GetMetadata() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:781: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::AddressBook::GetMetadata() const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:966: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Get<google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler>(int) const':
/usr/local/include/google/protobuf/repeated_ptr_field.h:270: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:270: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:270: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:270: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:271: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:271: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:271: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:271: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::AddressBook::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':

/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::io::EpsCopyOutputStream::EnsureSpace(unsigned char*)':
/usr/local/include/google/protobuf/io/coded_stream.h:675: undefined reference to `google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(unsigned char*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::UnknownFieldSet const& google::protobuf::internal::InternalMetadata::unknown_fields<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const& (*)()) const':
/usr/local/include/google/protobuf/metadata_lite.h:144: undefined reference to `google::protobuf::UnknownFieldSet::default_instance()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:342: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*, int, google::protobuf::internal::WireFormat::Operation, char const*)':
/usr/local/include/google/protobuf/wire_format.h:373: undefined reference to `google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*, int, google::protobuf::internal::WireFormatLite::Operation, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::io::EpsCopyOutputStream::EnsureSpace(unsigned char*)':
/usr/local/include/google/protobuf/io/coded_stream.h:675: undefined reference to `google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(unsigned char*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*, int, google::protobuf::internal::WireFormat::Operation, char const*)':
/usr/local/include/google/protobuf/wire_format.h:373: undefined reference to `google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*, int, google::protobuf::internal::WireFormatLite::Operation, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `__static_initialization_and_destruction_0(int, int)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:68: undefined reference to `google::protobuf::internal::AddDescriptorsRunner::AddDescriptorsRunner(google::protobuf::internal::DescriptorTable const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::InternalMetadata::SetArena(google::protobuf::Arena*, bool)':
/usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:74: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::Arena::AllocateAlignedWithHook(unsigned int, unsigned int, std::type_info const*)':
/usr/local/include/google/protobuf/arena.h:811: undefined reference to `google::protobuf::Arena::AllocateAlignedWithHook(unsigned int, std::type_info const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/arena.h:811: undefined reference to `google::protobuf::Arena::AllocateAlignedWithHook(unsigned int, std::type_info const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/arena.h:811: undefined reference to `google::protobuf::Arena::AllocateAlignedWithHook(unsigned int, std::type_info const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::VarintParseSlow(char const*, unsigned int, unsigned long long*)':
/usr/local/include/google/protobuf/parse_context.h:532: undefined reference to `google::protobuf::internal::VarintParseSlow64(char const*, unsigned int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::VarintParseSlow(char const*, unsigned int, unsigned int*)':
/usr/local/include/google/protobuf/parse_context.h:526: undefined reference to `google::protobuf::internal::VarintParseSlow32(char const*, unsigned int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::~RepeatedPtrField()':
/usr/local/include/google/protobuf/repeated_ptr_field.h:1191: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::DestroyProtos()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::Arena::SpaceAllocated() const':
/usr/local/include/google/protobuf/arena.h:360: undefined reference to `google::protobuf::internal::ThreadSafeArena::SpaceAllocated() const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()':
/usr/local/include/google/protobuf/repeated_ptr_field.h:1191: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::DestroyProtos()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::Arena::SpaceAllocated() const':
/usr/local/include/google/protobuf/arena.h:360: undefined reference to `google::protobuf::internal::ThreadSafeArena::SpaceAllocated() const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::Arena::AllocateInternal(unsigned int, unsigned int, void (*)(void*), std::type_info const*)':
/usr/local/include/google/protobuf/arena.h:600: undefined reference to `google::protobuf::Arena::AllocateAlignedWithCleanup(unsigned int, std::type_info const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**, int)':
/usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'

/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:155: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**, int)':
/usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:227: undefined reference to `google::protobuf::internal::EpsCopyInputStream::DoneFallback(int, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::ReadTag(char const*, unsigned int*, unsigned int)':
/usr/local/include/google/protobuf/parse_context.h:574: undefined reference to `google::protobuf::internal::ReadTagFallback(char const*, unsigned int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_internal_mutable_name[abi:cxx11]()':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.h:837: undefined reference to `google::protobuf::internal::ArenaStringPtr::Mutable[abi:cxx11](google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:562: undefined reference to `google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::stringpiece_internal::StringPiece::CheckSize(unsigned int)':
/usr/local/include/google/protobuf/stubs/stringpiece.h:190: undefined reference to `google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig(unsigned int, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::VerifyUTF8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, char const*)':
/usr/local/include/google/protobuf/parse_context.h:873: undefined reference to `google::protobuf::internal::VerifyUTF8(google::protobuf::stringpiece_internal::StringPiece, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_internal_mutable_email[abi:cxx11]()':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.h:933: undefined reference to `google::protobuf::internal::ArenaStringPtr::Mutable[abi:cxx11](google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:583: undefined reference to `google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::stringpiece_internal::StringPiece::CheckSize(unsigned int)':
/usr/local/include/google/protobuf/stubs/stringpiece.h:190: undefined reference to `google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig(unsigned int, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::VerifyUTF8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, char const*)':
/usr/local/include/google/protobuf/parse_context.h:873: undefined reference to `google::protobuf::internal::VerifyUTF8(google::protobuf::stringpiece_internal::StringPiece, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::TypeHandler>(google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::TypeHandler::Type const*)':
/usr/local/include/google/protobuf/repeated_ptr_field.h:217: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::AddOutOfLineHelper(void*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:597: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::UnknownFieldSet* google::protobuf::internal::InternalMetadata::mutable_unknown_fields<google::protobuf::UnknownFieldSet>()':
/usr/local/include/google/protobuf/metadata_lite.h:155: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**, int)':
/usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:216: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:219: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/parse_context.h:227: undefined reference to `google::protobuf::internal::EpsCopyInputStream::DoneFallback(int, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::ReadTag(char const*, unsigned int*, unsigned int)':
/usr/local/include/google/protobuf/parse_context.h:574: undefined reference to `google::protobuf::internal::ReadTagFallback(char const*, unsigned int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler>(google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler::Type const*)':
/usr/local/include/google/protobuf/repeated_ptr_field.h:217: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::AddOutOfLineHelper(void*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::AddressBook::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:857: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:873: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `void google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)':
/usr/local/include/google/protobuf/metadata_lite.h:261: undefined reference to `google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:387: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:387: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:387: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:387: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::_internal_set_number(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.h:732: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:728: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:728: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:728: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:728: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `void google::protobuf::internal::RepeatedPtrFieldBase::MergeFrom<google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::TypeHandler>(google::protobuf::internal::RepeatedPtrFieldBase const&)':
/usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&, void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void**, void**, int, int))':
/usr/local/include/google/protobuf/repeated_ptr_field.h:666: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_internal_set_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.h:833: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::_internal_set_email(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.h:929: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::AddressBook::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:938: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:938: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:938: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:938: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `void google::protobuf::internal::RepeatedPtrFieldBase::MergeFrom<google::protobuf::RepeatedPtrField<tutorial::Person>::TypeHandler>(google::protobuf::internal::RepeatedPtrFieldBase const&)':
/usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/repeated_ptr_field.h:303: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&, void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void**, void**, int, int))':
/usr/local/include/google/protobuf/repeated_ptr_field.h:666: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::UnknownFieldSet::Clear()':
/usr/local/include/google/protobuf/unknown_field_set.h:308: undefined reference to `google::protobuf::UnknownFieldSet::ClearFallback()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::InternalMetadata::~InternalMetadata()':
/usr/local/include/google/protobuf/metadata_lite.h:87: undefined reference to `google::protobuf::internal::InternalMetadata::CheckedDestruct()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person_PhoneNumber::SharedDtor()':
/Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:236: undefined reference to `google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:236: undefined reference to `google::protobuf::internal::LogMessage::operator<<(char const*)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:236: undefined reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:236: undefined reference to `google::protobuf::internal::LogMessage::~LogMessage()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/munir/Documents/protobuf-tutorial/build/../components/protobuf/proto-c/addressbook.pb.cc:237: undefined reference to `google::protobuf::internal::ArenaStringPtr::Destroy()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `google::protobuf::internal::InternalMetadata::~InternalMetadata()':
/usr/local/include/google/protobuf/metadata_lite.h:87: undefined reference to `google::protobuf::internal::InternalMetadata::CheckedDestruct()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /usr/local/include/google/protobuf/metadata_lite.h:87: undefined reference to `google::protobuf::internal::InternalMetadata::CheckedDestruct()'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj): in function `tutorial::Person::SharedDtor()':

/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.rodata._ZTVN8tutorial11AddressBookE[vtable for tutorial::AddressBook]+0x40): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.rodata._ZN8tutorial11AddressBook12_class_data_E+0x0): undefined reference to `google::protobuf::Message::CopyWithSourceCheck(google::protobuf::Message&, google::protobuf::Message const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.rodata._ZN8tutorial6Person12_class_data_E+0x0): undefined reference to `google::protobuf::Message::CopyWithSourceCheck(google::protobuf::Message&, google::protobuf::Message const&)'
/Users/munir/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(addressbook.pb.cc.obj):(.rodata._ZN8tutorial18Person_PhoneNumber12_class_data_E+0x0): undefined reference to `google::protobuf::Message::CopyWithSourceCheck(google::protobuf::Message&, google::protobuf::Message const&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
The terminal process "/bin/sh '-c', 'ninja '" terminated with exit code: 1.
I even tried to link the static library by adding these commands in CMakeList.txt.

Code: Select all

add_library(libprotobuf STATIC IMPORTED GLOBAL)
set_property(TARGET libprotobuf PROPERTY IMPORTED_LOCATION "/usr/local/lib/libprotobuf.a")
target_link_libraries(${COMPONENT_TARGET} PUBLIC libprotobuf)
Please any help would be appreciated.

Who is online

Users browsing this forum: No registered users and 377 guests