1

我正在尝试从 windows Visualcpp 项目构建一个NDK项目。

我在构建时从 NDK 方面得到的一些错误是:

1)“'size_type'没有命名类型第348行,外部位置:D:\Android\android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\bits\basic_string.tcc C/C++问题”

2)预期的';' 在成员声明第 80 行末尾,外部位置:D:\Android\android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\exception C/C++ 问题

Application.mkAndroid.mk文件的内容为:

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)

对内部错误的任何想法android_ndk_r9d\sources\cxx-stl\gnu-libstdc++\4.6\include\ folder.

4

0 回答 0