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<seeta::FaceInfo, std::allocator<seeta::FaceInfo> >*, std::vector<seeta::FaceInfo, std::allocator<seeta::FaceInfo> >*, float)'
jni/FaceDetection/src/fust.cpp:241: error: undefined reference to 'seeta::fd::NonMaximumSuppression(std::vector<seeta::FaceInfo, std::allocator<seeta::FaceInfo> >*, std::vector<seeta::FaceInfo, std::allocator<seeta::FaceInfo> >*, 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.htmlhtml