3
我想在Android中使用一些舊的C++代碼來構建一個包裝。NDK錯誤編譯
當編譯錯誤波紋管顯示:
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)
我能做些什麼來解決這些錯誤?
如果可能,然後把一些cxxx_wrap.c文件的代碼.. –