1

i am trying to use some dnn features from dlib in https://github.com/tzutalin/dlib-android but i am always getting errors like

error: no member named 'to_string' in
      namespace 'std'

and many more syntax errors

my application.mk file is like this

NDK_TOOLCHAIN_VERSION := clang
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_CPPFLAGS := -std=c++11 -frtti -fexceptions
APP_PLATFORM := android-8
APP_STL := gnustl_static
#APP_CFLAGS+=-DDLIB_NO_GUI_SUPPORT=on
#APP_CFLAGS+=-DDLIB_PNG_SUPPORT=off
APP_CFLAGS+=-DDLIB_JPEG_SUPPORT=on
APP_CFLAGS+=-DDLIB_JPEG_STATIC=on

According to me c++11 should be working ..I dont get where's the problem

Arpit Khurana
  • 144
  • 2
  • 14
  • You might have to use a different STL implementation. See e.g. http://stackoverflow.com/a/18124627/1524450 – Michael Mar 20 '17 at 13:41
  • well that did solved the particular problem surprisingly but now opencv compilation is giving error of std functions being absent.No idea why take a look at this-> std::range_error::range_error(std::string const&) – Arpit Khurana Mar 20 '17 at 15:51

1 Answers1

2

This is https://github.com/android-ndk/ndk/issues/82

The fix for this is to switch from gnustl to libc++, but note that libc++ isn't as stable as gnustl is yet (working on fixing this ASAP, should be ready by the time r15 hits stable).

EDIT: As of NDK r16 libc++ is the recommended STL. Switch to using libc++ (see our docs) for full C++11 (and beyond) support.

Dan Albert
  • 10,079
  • 2
  • 36
  • 79