Re: NDK r8c, gnustl_static, hash_map not find

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: NDK r8c, gnustl_static, hash_map not find

Eric Q9
Thanks Digit, I tried <ext/hash_map> and found other errors.

K:/android-ndk-r8c/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_tree.h:203: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_
tree_node_base*)'
K:/android-ndk-r8c/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_tree.h:269: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
K:/android-ndk-r8c/
sources/cxx-stl/gnu-libstdc++/4.6/include/ext/new_allocator.h:90: error: undefined reference to 'std::__throw_bad_alloc()'
.....


I have add -lstdc++ in LOCAL_CFLAGS as below.
_______________________________
Android.mk
LOCAL_CFLAGS    += -lstdc++
LOCAL_LDLIBS    := -L$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a -llog -landroid -lEGL -lGLESv1_CM -lgnustl_static -lsupc++
LOCAL_CFLAGS += -fno-rtti -fno-exceptions
LOCAL_NDK_STL_VARIANT := gnustl_static

What should I add to fix the undefined reference?

Eric

Digit於 2012年11月30日星期五UTC+8下午8時16分14秒寫道:
Try building with stlport_static instead. Or include <ext/hash_map> instead of <hash_map>.

On Thu, Nov 29, 2012 at 10:11 AM, Eric Q9 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="HdRvXEu377gJ">er...@...> wrote:
Hi,

I fail to build LatinIME\native by NDK with NDK r8c, APP_STL := gnustl_static.

Application.mk
APP_STL := gnustl_static

Error:
"Compile++ thumb : jni_latinime_common_static <= com_android_inputmethod_keyboard_ProximityInfo.cpp
In file included from jni/src/proximity_info.h:23:0, from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:22:
jni/src/hash_map_compat.h:25:20: fatal error: hash_map: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/jni_latinime_common_static/com_android_inputmethod_keyboard_ProximityInfo.o] Error 1

hash_map is available in the below path:
android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/4.4.3/include/ext/
android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/4.6/include/ext/

Do i need to add any Local Path or specify the 4.4.3 / 4.6 ?

Regards,
Eric Q9

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/6Vva9Zs3T5MJ.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="HdRvXEu377gJ">andro...@....
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="HdRvXEu377gJ">android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/tgHgNmOwnBYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.