/Users/ct/Desktop/MacintoshHD/android/android-ndk-r9d/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1115: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r9d/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1175: error: undefined reference to ‘std::__1::__get_classname(char const*, bool)’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r9d/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1115: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
./obj/local/armeabi/libcocos2dxinternal.a(CCNode.o):jni/…/…/cocos2d/cocos/./2d/CCNode.cpp:function vtable for std::__1::__match_any_but_newline: error: undefined reference to ‘std::__1::__match_any_but_newline::__exec(std::__1::__state&) const’
jni/…/…/cocos2d/cocos/./deprecated/CCArray.cpp:751: error: undefined reference to ‘__cxa_bad_typeid’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
编译android工程的时候编译不过。
不知道是什么原因,求解!
Android.mk 文件
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
(call import-add-path,(LOCAL_PATH)/…/…/cocos2d)
(call import-add-path,(LOCAL_PATH)/…/…/cocos2d/external)
(call import-add-path,(LOCAL_PATH)/…/…/cocos2d/cocos)
LOCAL_MODULE := XXLegend
LOCAL_MODULE_FILENAME := libXXLegend
LOCAL_CPP_FEATURES := exceptions
LOCAL_CFLAGS := -DEBUG_DRAW
LOCAL_SRC_FILES := hellocpp/main.cpp
…/…/Classes/Any.cpp
…/…/Classes/AppDelegate.cpp
…/…/Classes/AsyncTaskFactory.cpp
…/…/Classes/AudioEngine.cpp
…/…/Classes/BackpackTask.cpp
…
…
…
LOCAL_C_INCLUDES := (LOCAL_PATH)/hellocpp \
(LOCAL_PATH)/…/…/cocos2d
$(LOCAL_PATH)/…/…/Classes
LOCAL_STATIC_LIBRARIES := cocos2dx_static
include (BUILD_SHARED_LIBRARY) (call import-module,.)
Application.mk文件
APP_STL := c++_static
NDK_TOOLCHAIN_VERSION=clang
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic
APP_DEBUG := (strip (NDK_DEBUG))
ifeq ($(APP_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_CPPFLAGS += -DDEBUG_DRAW=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := release
endif