Referencia indefinida a AAssetManager_fromJava
Estoy tratando de acceder a los activos desde una aplicación de Android con AAssetManager. Sin embargo, continúo obteniendo "Referencia no definida a AAssetManager_fromJava" aunque he incluido asset_manager.h y asset_manager_jni.h No se puede hacer referencia a otras funciones de asset_manager.h, como AAssetManager_openDir (mgr, ""), etc.
Aquí está el código completo
#define EXPORT_API
#include <string.h>
#include <jni.h>
#include <android\log.h>
#include <sys\types.h>
#include <android\asset_manager.h>
#include <android\asset_manager_jni.h>
#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->AttachCurrentThread(&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
Este código está en un archivo .cpp y se está compilando con NDK R8. ¿Estoy haciendo algo terriblemente mal aquí?