title: How to build libprotobuf-lite.so
body: <p>I'm trying to get Protobuf lib to communicate between Java And JNI layer in Android. I get source code guided from <a href="https://developers.google.com/protocol-buffers/docs/reference/cpp-generated?hl=en" rel="nofollow">here</a>. So I added this as source file in Jni>Source_Sirectory. Now if I perform <strong><em>ndk-build</em></strong> to generate <strong>.so</strong> file then it prompt following error Log:</p>
  
  <pre><code>[armeabi] SharedLibrary  : libprotobuf-lite.so
  jni/src/google/protobuf/stubs/common.cc:201: error: undefined reference to 'google::protobuf::util::Status::ToString() const'
  jni/src/google/protobuf/stubs/common.cc:207: error: undefined reference to 'google::protobuf::operator&lt;&lt;(std::ostream&amp;, google::protobuf::uint128 const&amp;)'
  jni/src/google/protobuf/arena.h:622: error: undefined reference to 'google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned int)'
  jni/src/google/protobuf/arena.h:624: error: undefined reference to 'google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
  jni/src/google/protobuf/arena.h:462: error: undefined reference to 'google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
  jni/src/google/protobuf/arena.h:617: error: undefined reference to 'google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned int)'
  jni/src/google/protobuf/arena.h:617: error: undefined reference to 'google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned int)'
  jni/src/google/protobuf/arena.h:617: error: undefined reference to 'google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned int)'
  jni/src/google/protobuf/arena.h:633: error: undefined reference to 'google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
  jni/src/google/protobuf/arena.h:624: error: undefined reference to 'google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
  jni/src/google/protobuf/wire_format_lite.cc:514: error: undefined reference to 'google::protobuf::internal::IsStructurallyValidUTF8(char const*, int)'
  jni/src/google/protobuf/wire_format_lite.cc:527: error: undefined reference to 'google::protobuf::StringPrintf(char const*, ...)'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p><strong>Any suggestion if I'm missing anything here?</strong></p>