0
我也跟着上http://android.wooyd.org/JNIExample/發現教程,當我嘗試建立與cygwin的,我得到:NDK建造沒有通話功能正常
undefined reference to `android::AndroidRuntime::registerNativeMethods(_JNIEnv*, char const*, JNINativeMethod const*, int)'
在包括我發現registerNativeMethods功能
的聲明如下:
static int registerNativeMethods(JNIEnv* env,
const char* className, const JNINativeMethod* gMethods, int numMethods);
我不明白爲什麼編譯器在將const char *和JNINativeMethod []傳遞給char const *和JNINativeMethod const *時讀取函數的輸入。雖然我查看並發現它說char const *和const char *是相同的地方。如果是的話,爲什麼我會得到這個錯誤。
如果它有所不同,我的ndk的入口點是一個C++文件,即時通訊使用股票cygwin。