Android NDK:未定义的引用错误

时间:2014-01-31 06:58:05

标签: android android-ndk irrlicht

当我编译irrlicht项目时,它向我显示了这么多未定义的引用错误。我想它正在寻找附带android ndk包的egl.h。

这是错误日志:

[armeabi] SharedLibrary  : libirrlichttest.so
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:274: error: undefined reference to 'AInputEvent_getType'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:277: error: undefined reference to 'AMotionEvent_getPointerCount'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:278: error: undefined reference to 'AMotionEvent_getAction'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:313: error: undefined reference to 'AMotionEvent_getX'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:314: error: undefined reference to 'AMotionEvent_getY'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::closeDevice():jni/Android/CIrrDeviceAndroid.cpp:171: error: undefined reference to 'ANativeActivity_finish'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::run():jni/Android/CIrrDeviceAndroid.cpp:110: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:55: error: undefined reference to 'ASensorManager_getInstance'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:56: error: undefined reference to 'ASensorManager_createEventQueue'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:69: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:55: error: undefined reference to 'ASensorManager_getInstance'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:56: error: undefined reference to 'ASensorManager_createEventQueue'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:69: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleAndroidCommand(android_app*, int):jni/Android/CIrrDeviceAndroid.cpp:215: error: undefined reference to 'ANativeWindow_getWidth'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleAndroidCommand(android_app*, int):jni/Android/CIrrDeviceAndroid.cpp:216: error: undefined reference to 'ANativeWindow_getHeight'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK10:jni/Android/CAndroidAssetReader.cpp:57: error: undefined reference to 'AAsset_getLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK11:jni/Android/CAndroidAssetReader.cpp:62: error: undefined reference to 'AAsset_getLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK11:jni/Android/CAndroidAssetReader.cpp:62: error: undefined reference to 'AAsset_getRemainingLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK9:jni/Android/CAndroidAssetReader.cpp:50: error: undefined reference to 'AAsset_seek'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK8:jni/Android/CAndroidAssetReader.cpp:45: error: undefined reference to 'AAsset_read'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK5:jni/Android/CAndroidAssetReader.cpp:40: error: undefined reference to 'AAsset_close'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::~CAndroidAssetReader():jni/Android/CAndroidAssetReader.cpp:40: error: undefined reference to 'AAsset_close'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::CAndroidAssetReader(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetReader.cpp:32: error: undefined reference to 'AAssetManager_open'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::CAndroidAssetReader(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetReader.cpp:32: error: undefined reference to 'AAssetManager_open'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetFileArchive.o): in function irr::io::CAndroidAssetFileArchive::addDirectory(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetFileArchive.cpp:87: error: undefined reference to 'AAssetManager_openDir'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetFileArchive.o): in function irr::io::CAndroidAssetFileArchive::addDirectory(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetFileArchive.cpp:92: error: undefined reference to 'AAssetDir_getNextFileName'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::swapBuffers():jni/CEGLManager.cpp:348: error: undefined reference to 'eglSwapBuffers'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroyContext():jni/CEGLManager.cpp:323: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroyContext():jni/CEGLManager.cpp:324: error: undefined reference to 'eglDestroyContext'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroySurface():jni/CEGLManager.cpp:271: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroySurface():jni/CEGLManager.cpp:273: error: undefined reference to 'eglDestroySurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::terminate():jni/CEGLManager.cpp:85: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::terminate():jni/CEGLManager.cpp:87: error: undefined reference to 'eglTerminate'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:157: error: undefined reference to 'eglChooseConfig'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:240: error: undefined reference to 'eglGetConfigAttrib'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:242: error: undefined reference to 'ANativeWindow_setBuffersGeometry'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:246: error: undefined reference to 'eglCreateWindowSurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:249: error: undefined reference to 'eglCreateWindowSurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:256: error: undefined reference to 'eglBindAPI'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:260: error: undefined reference to 'eglSwapInterval'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::testEGLError():jni/CEGLManager.cpp:354: error: undefined reference to 'eglGetError'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::activateContext(irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:331: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateContext():jni/CEGLManager.cpp:307: error: undefined reference to 'eglCreateContext'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:51: error: undefined reference to 'eglGetDisplay'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:63: error: undefined reference to 'eglInitialize'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLES2Driver.o): in function irr::video::COGLES2Driver::testEGLError():jni/COGLES2Driver.cpp:1633: error: undefined reference to 'eglGetError'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:246: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:247: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:248: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:249: error: undefined reference to 'eglGetProcAddress'
collect2: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/libirrlichttest.so] Error 1

**** Build Finished ****

这是我的android.mk(删除一些cpp文件只是为了截屏)

  

enter image description here

这是我的application.mk

APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-10
APP_MODULE := irrlicht 

我做错了什么?

1 个答案:

答案 0 :(得分:6)

您无需在CFLAGS中明确添加NDK包含目录。如果没有它就无法编译项目,那么你的配置是错误的。

您的Android.mk未命中

LOCAL_LDLIBS := -llog -landroid -lEGL 

可能还有一些ndk库