title: Undefined reference to AAssetManager_fromJava
body: <p>I am trying to access assets from an android apk using AAssetManager. However, I keep getting 
  "Undefined reference to AAssetManager_fromJava" even though I've included asset_manager.h and asset_manager_jni.h
  Other functions from asset_manager.h, like AAssetManager_openDir(mgr, "") etc also can't be referenced.</p>
  
  <p>Here's the complete code</p>
  
  <pre><code>#define EXPORT_API
  
  #include &lt;string.h&gt;
  #include &lt;jni.h&gt;
  #include &lt;android\log.h&gt;
  
  #include &lt;sys\types.h&gt;
  #include &lt;android\asset_manager.h&gt;
  #include &lt;android\asset_manager_jni.h&gt;
  
  #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "com.devin - native", __VA_ARGS__)
  
  JNIEnv* env=0;
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* pvt){
      LOGD("JNI_OnLoad() called");
      vm-&gt;AttachCurrentThread(&amp;env, 0);
      return JNI_VERSION_1_2;
  }
  
  EXPORT_API void LoadAsset(char* filename, jobject assetManager){
      AAssetManager* mgr = AAssetManager_fromJava(env, assetManager);
          /* More stuff */
  }
  
  #ifdef __cplusplus
  };
  #endif
  </code></pre>
  
  <p>This code is in a .cpp file and being compiled with NDK R8. Am I doing something terribly wrong here?</p>