当我使用NDK R10 (最新版本)编译google play服务最低限度示例时,我得到了这些错误,我尝试使用LOCAL_STATIC_LIBRARIES,但错误仍然是一样的。
Android NDK: WARNING:jni/Android.mk:native-activity: non-system libraries in lin
ker flags: -lgnustl_static
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_S
TATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependenc
ies of the
Android NDK: current module
[armeabi] Compile++ thumb: native-activity <= main.cpp
[armeabi] Compile++ thumb: native-activity <= StateManager.cpp
[armeabi] Compile thumb : android_native_app_glue <= android_native_app_glue.c
[armeabi] StaticLibrary : libandroid_native_app_glue.a
[armeabi] SharedLibrary : libnative-activity.so
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::MD5(char const*, int): error: undefined reference to 'MD5_In
it'
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::MD5(char const*, int): error: undefined reference to 'MD5_Up
date'
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::MD5(char const*, int): error: undefined reference to 'MD5_Fi
nal'
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::ContentMD5AtPath(std::string const&, std::string const&): er
ror: undefined reference to 'MD5_Init'
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::ContentMD5AtPath(std::string const&, std::string const&): er
ror: undefined reference to 'MD5_Update'
jni/../../gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a:turn_based_match_impl.
pb.cc:function gpg::ContentMD5AtPath(std::string const&, std::string const&): er
ror: undefined reference to 'MD5_Final'谢谢。
发布于 2014-09-09 19:00:14
我通过重新安装sdk和ndk到"32位平台版本“解决了这个问题。因为我是用"android-ndk64-r10-windows-x86“(64位平台32位目标)编译的,所以会导致这个错误。我认为这个包中可能没有md5库。尝试使用"android-ndk32-r10-windows-x86“。
发布于 2014-11-28 05:39:44
MD5已从Lollipop的libc中删除,请参阅。当然,它从来不是libc的一部分。你可以在libcrypto中找到md5,或者自己编译它。
https://stackoverflow.com/questions/25706869
复制相似问题