title: Android NDK: Linking x86 shared library
body: <p>I was given a shared library built on Linux x86, let's call it libA.so, and I want to use the function calls provided by this library SDK.</p>
  
  <p>I am having issues building and have a few questions:</p>
  
  <p>1) I will be able to build for x86, but will I be able to build for arm? I believe the answer is no, meaning I cannot run on a Nexus 5 for example.
  2) The ndk-build complains of the #include that should be resolved by my LOCAL_SHARED_LIBRARIES. I am not sure why that is. My Android.mk is as follow:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE    := B
  LOCAL_SRC_FILES := B.cpp
  
  LOCAL_SHARED_LIBRARIES := A
  LOCAL_LDLIBS := -llog
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>Can someone please help me resolve my Android.mk? I don't understand why it is complaining about my include statement in B.cpp. Please let me know if I can run B in an arm environment, although the SDK I am relying on was built on x86.</p>