Cocos2dx 3.3 Android 编译不过

/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

自己先来顶一个。
首先环境配置应该是么有问题,用cocos new出来得项目,直接编译可以通过,环境配置ok。
就是不知道是不是Android mk写的不对导致,求知道!

看了跟新的note。需要更换ndk,现在版本为r10c,编译还是不过。
relocation overflow in R_ARM_THM_CALL 有个这样得错误。

/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1150: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1210: error: undefined reference to ‘std::__1::__get_classname(char const*, bool)’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1150: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
./obj/local/armeabi/libcocos2dxinternal.a(CCNode.o):jni/…/…/cocos2d/cocos/./2d/CCNode.cpp:vtable for std::__1::__match_any_but_newline: error: undefined reference to ‘std::__1::__match_any_but_newline::__exec(std::__1::__state&) const’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/map:1055: error: relocation overflow in R_ARM_THM_CALL
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** Error 1

应用这个PR就可以了

https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/pull/71

解决了R_ARM_THM_CALL的问题,
就是
StaticLibrary : libcocos2dandroid.a
SharedLibrary : libTest.so
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1150: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1210: error: undefined reference to ‘std::__1::__get_classname(char const*, bool)’
./obj/local/armeabi/libcocos2dxinternal.a(CCNode.o):CCNode.cpp:vtable for std::__1::__match_any_but_newline: error: undefined reference to ‘std::__1::__match_any_but_newline::__exec(std::__1::__state&) const’
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1150: error: undefined reference to ‘std::__1::__get_collation_name(char const*)’
jni/…/…/cocos2d/cocos/./deprecated/CCArray.cpp:751: error: undefined reference to ‘__cxa_bad_typeid’
collect2: error: ld returned 1 exit status
make: *** Error 1

Change APP_STL:=c++_static to APP_STL:=gnustl_static, change NDK_TOOLCHAIN_VERSION=clang to NDK_TOOLCHAIN_VERSION=4.9 in Application.mk

不改的话就用r9d编。

重新编译了一把,发现还是有
/Users/ct/Desktop/MacintoshHD/android/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/regex:1210: error: undefined reference to ‘std::__1::__get_classname(char const*, bool)’
这样得问题,不知道是不是哪里节奏不对!
ios么有问题
问题就是出在那个CCNode中调用的regex中相关的接口,注释就能顺利编译通过。不知道哪里的姿势不对导致

使用r10c编译的时候有修改这个吗?

Change APP_STL:=c++_static to APP_STL:=gnustl_static, change NDK_TOOLCHAIN_VERSION=clang to NDK_TOOLCHAIN_VERSION=4.9 in Application.mk

这样说吧。APP_STL:=gnustl_static 如果使用这个库编译的话,对我现在的项目改动略大了。
在3.2的时候一直用的APP_STL:=c++_static
现在如果按照之前的说法,换成r9d的话,也是有同样得问题存在。一开始的时候我就用的是r9d。

创建的新工程直接修改APP_STL:=c++_static,NDK_TOOLCHAIN_VERSION=4.9也可以编译通过。
然后加入了项目工程的代码,就编译不过了,在最后的时候。
项目ios版本使用的是C++11-std=c++11]

问题找到了,是在spine那里出了问题,spine的mk,做了些改动,还用了原先的写法导致出了问题。
已经修复