I try to set up my first android project using ndk r8d with c++11 support. Some c+11 mechanisms work fine (i.e. lambada expressions), but when i try to use one of the new string operations, the compile fails ( error: 'stol' is not a member of 'std'). Here are my project settings:
Application.mk
APP_MODULES := MyLib
APP_CPPFLAGS := -std=gnu++0x
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DDEBUG
APP_ABI := armeabi-v7a
APP_PLATFORM:=android-14
APP_STL := gnustl_static
APP_GNUSTL_CPP_FEATURES := rtti exceptions
NDK_TOOLCHAIN_VERSION=4.7
Are those functions actually not working?
Seems to be answered in another thread.
The reason why you cannot use the functions is quite deep rooted, and unfortunately currently unsolvable.
In GNU STL implementation of these function somehow relies on c99 (_GLIBCXX_USE_C99 macro), that is not used by Android
The root cause seems to be that the C99 functionality usage has been disabled in the GNU stdlibc++ on the armeabi-v7a platform due to the fact the the Bionic libc does not support complex math (the standard C library on Android is Bionic).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With