NDK does not find standard C ++ libraries

I am trying to compile my own Android program.

But when running the ndk-build command, I got the following result.

/home/marcos/dev/workspace/rmsdk.native.wraper/jni/include-all/uft_alloc.h:26:21: error: stdexcept: No such file or directory
/home/marcos/dev/workspace/rmsdk.native.wraper/jni/include-all/uft_alloc.h:27:18: error: limits: No such file or directory

stdexcept and limits are part of the std c ++ lib.

This is my Android.mk

LOCAL_PATH := $(call my-dir)
MY_PATH := $(LOCAL_PATH)
include $(call all-subdir-makefiles)
LOCAL_PATH := $(MY_PATH)
include $(CLEAR_VARS)

LOCAL_LDLIBS := -llog
LOCAL_MODULE    := rmsdk
LOCAL_SRC_FILES := curlnetprovider.cpp RMServices.cpp  
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include-all
LOCAL_STATIC_LIBRARIES := adept cryptopenssl curl dp expat fonts hobbes jpeg mschema png t3 xml zlib

include $(BUILD_SHARED_LIBRARY)

Should I point out that this is a C ++ source?

+5
source share
2 answers

In Application.mk (if it does not exist, create it) add the following line:

APP_STL: = stlport_static

Now you can use STL.

+6
source

Indeed, the NDK does not provide the entire Standard C ++ library.

So, I'm starting to use Crystax-modified NDK.

Now that’s fine.

0
source

All Articles