我正在尝试使用 Android 中的一些旧 C++ 代码构建一个包装器。
编译时出现如下错误:
In file included from /usr/local/android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_algobase.h:61:0,
from /usr/local/android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_tree.h:63,
from /usr/local/android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/map:60,
from /home/vocalize/source/xxxxxxxxxxxxxxxxxxxxx/Lxxxxxxx.h:9,
from /home/vocalize/source/xxxxxxxxxxxxxxxxx/jni/cxxx_wrap.c:3:
/usr/local/android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/functexcept.h:43:1: error: unknown type name 'namespace'
/usr/local/android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/functexcept.h:44:1: error: expected ',' or ';' before '{' token
我正在使用以下 Makefile.mk
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(MY_LIB_DIR)include
LOCAL_CFLAGS += -DHAVE_CONFIG_H
LOCAL_CFLAGS += -DANDROID_NDK
LOCAL_PATH := $(BASE_PATH)
LOCAL_MODULE := cxxxx_lib
LOCAL_SRC_FILES := cxxxx_wrap.c
LOCAL_STATIC_LIBRARIES := my_lib
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
我能做些什么来修复这些错误?