NDK编译报错 undefined reference to 'vtable for


jni/FaceDetection/include/classifier.h:49: error: undefined reference to 'vtable for seeta::fd::SURFMLP'
D:/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
jni/FaceDetection/src/fust.cpp:272: error: undefined reference to 'vtable for seeta::fd::LABBoostModelReader'
D:/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
jni/FaceDetection/src/fust.cpp:272: error: undefined reference to 'vtable for seeta::fd::SURFMLPModelReader'
D:/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
jni/FaceDetection/src/fust.cpp:288: error: undefined reference to 'vtable for seeta::fd::LABBoostedClassifier'
D:/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
jni/FaceDetection/src/fust.cpp:304: error: undefined reference to 'vtable for seeta::fd::LABFeatureMap'
D:/android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
jni/FaceDetection/src/fust.cpp:170: error: undefined reference to 'seeta::fd::NonMaximumSuppression(std::vector >*, std::vector >*, float)'
jni/FaceDetection/src/fust.cpp:241: error: undefined reference to 'seeta::fd::NonMaximumSuppression(std::vector >*, std::vector >*, float)'
collect2.exe: error: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/libSeetafaceSo.so] Error 1

解决问题:  在android.mk中加入  LOCAL_ALLOW_UNDEFINED_SYMBOLS := true


鸣谢:http://blog.sina.com.cn/s/blog_5be1061c0100ykim.html

你可能感兴趣的:(android)