After C++11, various cmath
functions previously in the global namespace are moved to the std
namespace, when including the
h
This seems to be a known issue with C++11 support on android. There is a known issue that indicates that a lot of the routines are missing:
When compiling c++ code with
-std=c++11
and usinggnustl_shared
, many C99 math functions are not provided by theheader as they should.
You're probably better off assuming that only a limited subset of the c++ library is available for android - this seems to be indicated in the CPLUSPLUS-SUPPORT.html
file in the docs/
for the ndk.
Mind you when I have:
APP_STL := c++_static
in my Application.mk
and
LOCAL_CPPFLAGS := -std=c++11
in my Android.mk
, then files making use of std::cbrt
and std::round
compile cleanly; but it is against the static LLVM libc++, rather than against the gnu standard library.