gpt4 book ai didi

android jni ndk-build------------> 未定义对 `std::allocator::allocator()' 的引用

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:00:42 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com