title: Apple Mach-O linker error: Undefined symbols for architecture armv7 Google Protobuf
body: <p>I've been working on a project that contains two parts:</p>
  
  <ol>
  <li>A Cocoa Touch Static Library (.framework)</li>
  <li>A Demo application that uses my (.framework) Static Library</li>
  </ol>
  
  <p>I have learned that any .framework that is added to my .framework (i.e., opencv2.framework) must also be added to my Demo application.  I've also learned that the <strong>Build Settings for Architectures</strong> must be the same and the <strong>Build Settings Search Paths</strong> must be set.</p>
  
  <p>Happy as can be, I've been building and using my .framework in my Demo application for quite some time.  Recently, I've added Google Protocol Buffers to my .framework.  </p>
  
  <ol>
  <li>My .framework is compiling and all seems well in the .framework. </li>
  <li>Of course, my Demo application wasn't very happy.</li>
  </ol>
  
  <p>So now I've added the libprotobuf-lite.a to my Demo application and added the path to the Header files in the <strong>Header Search Paths</strong>.</p>
  
  <p>This should do the trick.  But instead, I receive the following errors and thus far have not been able to find an answer.  Here is the error log:</p>
  
  <pre><code>Undefined symbols for architecture armv7:
    "vtable for google_public::protobuf::Message", referenced from:
        google_public::protobuf::Message::Message() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
    "typeinfo for google_public::protobuf::Message", referenced from:
        typeinfo for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
        message::FtypeMessage const* google_public::protobuf::internal::dynamic_cast_if_available&lt;message::FtypeMessage const*, google_public::protobuf::Message const*&gt;(google_public::protobuf::Message const*) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::GetTypeName() const", referenced from:
        vtable for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::InitializationErrorString() const", referenced from:
        vtable for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::SpaceUsed() const", referenced from:
        vtable for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::ReflectionOps::Merge(google_public::protobuf::Message const&amp;, google_public::protobuf::Message*)", referenced from:
        message::FtypeMessage::MergeFrom(google_public::protobuf::Message const&amp;) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const*, int, google_public::protobuf::internal::WireFormat::Operation)", referenced from:
        google_public::protobuf::internal::WireFormat::VerifyUTF8String(char const*, int, google_public::protobuf::internal::WireFormat::Operation) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "_OBJC_CLASS_$_CVImageConverter", referenced from:
        objc-class-ref in Test-Remote-iOS-Aggregate(IDMessageCommand.o)
    "google_public::protobuf::UnknownFieldSet::ClearFallback()", referenced from:
        google_public::protobuf::UnknownFieldSet::Clear() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::DiscardUnknownFields()", referenced from:
        vtable for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google_public::protobuf::UnknownFieldSet const&amp;)", referenced from:
        message::FtypeMessage::ByteSize() const in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::WireFormat::SerializeUnknownFields(google_public::protobuf::UnknownFieldSet const&amp;, google_public::protobuf::io::CodedOutputStream*)", referenced from:
        message::FtypeMessage::SerializeWithCachedSizes(google_public::protobuf::io::CodedOutputStream*) const in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;))", referenced from:
        message::protobuf_AddDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::WireFormat::SkipField(google_public::protobuf::io::CodedInputStream*, unsigned int, google_public::protobuf::UnknownFieldSet*)", referenced from:
        message::FtypeMessage::MergePartialFromCodedStream(google_public::protobuf::io::CodedInputStream*) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::UnknownFieldSet::MergeFrom(google_public::protobuf::UnknownFieldSet const&amp;)", referenced from:
        message::FtypeMessage::MergeFrom(message::FtypeMessage const&amp;) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google_public::protobuf::Descriptor const*, google_public::protobuf::Message const*, int const*, int, int, int, google_public::protobuf::DescriptorPool const*, google_public::protobuf::MessageFactory*, int)", referenced from:
        message::protobuf_AssignDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::~Message()", referenced from:
        message::FtypeMessage::FtypeMessage() in Test-Remote-iOS-Aggregate(ftype.pb.o)
        message::FtypeMessage::~FtypeMessage() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from:
        message::FtypeMessage::FtypeMessage() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::CheckTypeAndMergeFrom(google_public::protobuf::MessageLite const&amp;)", referenced from:
        vtable for message::FtypeMessage in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::DescriptorPool::generated_pool()", referenced from:
        message::protobuf_AssignDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int)", referenced from:
        message::protobuf_AddDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::Message::SerializeToOstream(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;*) const", referenced from:
        message::TestMessaging::ftypeMessage(void const*, unsigned long) in Test-Remote-iOS-Aggregate(TestMessaging.o)
    "google_public::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google_public::protobuf::Descriptor const*, google_public::protobuf::Message const*)", referenced from:
        message::(anonymous namespace)::protobuf_RegisterTypes(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;) in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google_public::protobuf::UnknownFieldSet const&amp;, unsigned char*)", referenced from:
        message::FtypeMessage::SerializeWithCachedSizesToArray(unsigned char*) const in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::DescriptorPool::FindFileByName(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;) const", referenced from:
        message::protobuf_AssignDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::MessageFactory::generated_factory()", referenced from:
        message::protobuf_AssignDesc_ftype_2eproto() in Test-Remote-iOS-Aggregate(ftype.pb.o)
    "google_public::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from:
        message::FtypeMessage::FtypeMessage() in Test-Remote-iOS-Aggregate(ftype.pb.o)
        message::FtypeMessage::~FtypeMessage() in Test-Remote-iOS-Aggregate(ftype.pb.o)
  ld: symbol(s) not found for architecture armv7
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Any ideas on what could be the likely issue here?</p>
  
  <p>Thank you.</p>