android jni ndk-build------------>错误是: 对 `std::allocator::allocator()' 的 undefined reference
我在 project/JNI/下创建了一个 Application.mk 使用“APP_STL := gnuSTL_static”
所以,任何想法,为什么 undefined reference 。
环境是ubuntu10.4,NDK是r5b,
最佳答案
您需要保证在库的末尾设置了“libgnuSTL_static.a”,因为它们似乎依赖于它:
例子:
LOCAL_LDFLAGS += <system/your libs>
LOCAL_LDFLAGS += -L$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi -lgnustl_static
我添加了同样的问题并用这个...克服了它
关于android jni ndk-build------------> 未定义对 `std::allocator<char>::allocator()' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7846449/