Android C ++ support for to_string, stof, etc.

Is there any Android ndk based compiler gcc 4.7, support to_string, stofand other string conversion functions?

In NDK, I use the function found in ext/vstring.h. But the function is wrapped in

#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99))

I turn on the flag -std=c++11.

How to enable GXX_EXPERIMENTAL_CXX0X?

+5
source share
1 answer

I turned it on by simply adding it as a symbol in the project properties -> C / C ++. General → Symbols-> GNU C ++

I also added this to Android.mk: LOCAL_CPPFLAGS: = -std = gnu ++ 0x

0
source

All Articles