开发者

NDK do not find the standard C++ libraries

I'm trying to compile a native program for android.

But when runnning 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)
LOC开发者_JAVA技巧AL_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)

I should explicit tell that it's a C++ source?


In Application.mk (if it doesn't exist, create it) add the following line:

APP_STL := stlport_static

You will now be able to use the STL.


Really, the NDK do not provide all the Standard C++ library.

So, I start to use the NDK modified by crystax.

This works fine now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜