0

I got these error when i compile the google play service sample minimalist using NDK R10 (the lastest version) i try using LOCAL_STATIC_LIBRARIES but the error still the same.

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'

Thank you.

jww
  • 97,681
  • 90
  • 411
  • 885
ioipts
  • 41
  • 3

2 Answers2

0

I solved the problem by reinstalling both sdk and ndk to "32 bit platform version". it causes the error because i compiled with "android-ndk64-r10-windows-x86" (64 bit platform 32 bit target). I think maybe no md5 lib in this package. try to use "android-ndk32-r10-windows-x86".

ioipts
  • 41
  • 3
0

MD5 was removed from libc in Lollipop, see discussion. It was never part of libc by right. You can find md5 in libcrypto, or compile it yourself.

Community
  • 1
  • 1
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307