Error Inside Android NDK

661 Views Asked by At

I am trying to build a NDK project from a windows Visualcpp project.

Some of the errors which i get from the NDK side when I build are :

1) "'size_type' does not name a type line 348, external location: D:\Android\android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\bits\basic_string.tcc C/C++ Problem"

2) expected ';' at end of member declaration line 80, external location: D:\Android\android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\exception C/C++ Problem

The contents of Application.mk and Android.mk files are:

1. Application.mk :

APP_ABI := all
APP_OPTIM := debug
#APP_STL := gnustl_static
APP_STL := gnustl_shared
#APP_STL := stlport_static
#APP_STL := stlport_shared
#APP_STL := c++_static
#APP_STL := c++_shared
APP_PLATFORM := android-16

2. Android.mk :

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

#include $(call all-subdir-makefiles)

LOCAL_MODULE := test

#base_intermediates := $(call local-intermediates-dir)

#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/headers-are-here \

#LOCAL_SHARED_LIBRARIES = libstlport
#LOCAL_STATIC_LIBRARIES := test 

LOCAL_SRC_FILES := test.cpp

#LOCAL_CPP_EXTENSION := .cxx .cpp .cc
#LOCAL_C_EXTENSION := .c

LOCAL_C_INCLUDES := \
      $(LOCAL_PATH)/native \

#NDK_TOOLCHAIN_VERSION := clang
#LOCAL_CPPFLAGS := -std=c++11

#LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
#     $(LOCAL_PATH)/gcc \
#     $(LOCAL_PATH)/gcc/include \
#     $(LOCAL_PATH)/gcc/include/c++ \
#     $(LOCAL_PATH)/gcc/include/c++/bits \
#     $(LOCAL_PATH)/gcc/include/ssp \

#LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include/bits \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include/backward \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86 \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include/ \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include \
#     $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include \

#ifeq ($(TARGET_ARCH),arm)
#LOCAL_CFLAGS += -DENABLE_ARM_SPECIFIC_MAGIC
#endif

LOCAL_LDLIBS    := -lm -llog -ljnigraphics #-lgnustl_shared -libgnustl_static
#LOCAL_LDLIBS += $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a

include $(BUILD_SHARED_LIBRARY)

Any idea of the error inside the android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\ folder.

0

There are 0 best solutions below