It seems like static_c++ library of sdkbox plugins can be used with ndk r10e only?
Could you provide updated libraries with latest ndk r13b?
Environment:
Windows 10
cocos2d-x 3.13.1
sdkbox v1.0.1.0
NDK r13b, clang, c++_static
Reproduct steps:
- create a new project with
cocos
command - download sdkbox from website and import any plugin, iap for example.
- use static_c++ library instead of gnustl one in sdkbox and plugin directories.
- modify
AppDelegate.cpp
to initialize plugin - modify
Application.md
located inproj.android-studio/app/jni
: changeAPP_STL
toc++_static
, addAPP_ABI := armeabi
- run
set NDK_TOOLCHAIN_VERSION=clang
- compile by using
cocos compile -p android --android-studio
Output:
Building mode: debug
Using Android Studio project : C:\proj\test\test-sdkbox\proj.android-studio
running: ‘“C:\dev\sdk\android-sdk\tools\android” update project -t android-22 -p C:\proj\test\test-sdkbox\proj.android-studio\app’
Updated project.properties
Updated local.properties
Updated file C:\proj\test\test-sdkbox\proj.android-studio\app\proguard-project.txt
Building native…
NDK build mode: debug
running: ‘“D:\sdk\android-ndk-r13b\ndk-build” -C C:\proj\test\test-sdkbox\proj.android-studio\app -j8 NDK_MODULE_PATH=C:\proj\test\test-sdkbox\proj.android-studio…/cocos2d;C:\proj\test\test-sdkbox\proj.android-studio…/cocos2d/cocos;C:\proj\test\test-sdkbox\proj.android-studio…/cocos2d/external NDK_TOOLCHAIN_VERSION=clang NDK_DEBUG=1’
make: Entering directory C:/proj/test/test-sdkbox/proj.android-studio/app' [armeabi] Compile++ arm : cocostudio_static <= WidgetReader.cpp [armeabi] Compile++ arm : cocostudio_static <= FlatBuffersSerialize.cpp [armeabi] Compile++ arm : cocostudio_static <= WidgetCallBackHandlerProtocol.cpp [armeabi] Compile++ arm : cocostudio_static <= CCComExtensionData.cpp .... .... .... [armeabi] StaticLibrary : libbullet.a [armeabi] StaticLibrary : libcpufeatures.a [armeabi] StaticLibrary : libcocos2dandroid.a [armeabi] SharedLibrary : libMyGame.so /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4448: error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4448: error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:479: error: undefined reference to 'std::__1::ios_base::getloc() const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:479: error: undefined reference to 'std::__1::locale::~locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::ios_base::getloc() const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::locale::~locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:494: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:494: error: undefined reference to 'std::__1::ctype<char>::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:508: error: undefined reference to 'std::__1::ios_base::getloc() const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:508: error: undefined reference to 'std::__1::locale::~locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::ios_base::getloc() const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::locale::~locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:520: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:520: error: undefined reference to 'std::__1::ctype<char>::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4448: error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:3639: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()' jni/./sdkbox/libs/armeabi/libsdkbox.a(Base64.o):Base64.cpp:typeinfo for std::__1::__shared_ptr_pointer<char*, std::__1::default_delete<char>, std::__1::allocator<char> >: error: undefined reference to 'typeinfo for std::__1::__shared_weak_count' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4448: error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:3639: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()' jni/./sdkbox/libs/armeabi/libsdkbox.a(RequestManager.o):RequestManager.cpp:typeinfo for std::__1::__shared_ptr_pointer<sdkbox::XMLHttpRequest*, std::__1::default_delete<sdkbox::XMLHttpRequest>, std::__1::allocator<sdkbox::XMLHttpRequest> >: error: undefined reference to 'typeinfo for std::__1::__shared_weak_count' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:3639: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()' jni/./sdkbox/libs/armeabi/libsdkbox.a(SdkboxCore.o):SdkboxCore.cpp:typeinfo for std::__1::__shared_ptr_pointer<sdkbox::AppLifeCycleListener*, std::__1::default_delete<sdkbox::AppLifeCycleListener>, std::__1::allocator<sdkbox::AppLifeCycleListener> >: error: undefined reference to 'typeinfo for std::__1::__shared_weak_count' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:3639: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()' jni/./sdkbox/libs/armeabi/libsdkbox.a(XMLHttpRequest.o):XMLHttpRequest.cpp:typeinfo for std::__1::__shared_ptr_pointer<sdkbox::XMLHttpRequestListener*, std::__1::default_delete<sdkbox::XMLHttpRequestListener>, std::__1::allocator<sdkbox::XMLHttpRequestListener> >: error: undefined reference to 'typeinfo for std::__1::__shared_weak_count' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:343: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)' jni/src/LogAndroid.cpp:58: error: undefined reference to 'std::__1::cout' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:661: error: undefined reference to 'std::__1::ios_base::~ios_base()' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:546: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:546: error: undefined reference to 'std::__1::ctype<char>::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()' jni/./pluginiap/libs/armeabi/libPluginIAP.a(IAPWrapper.o):IAPWrapper.cpp:typeinfo for std::__1::basic_ios<char, std::__1::char_traits<char> >: error: undefined reference to 'typeinfo for std::__1::ios_base' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/istream:288: error: undefined reference to 'std::__1::ctype<char>::id' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [obj/local/armeabi/libMyGame.so] Error 1 make: Leaving directory
C:/proj/test/test-sdkbox/proj.android-studio/app’
Error running command, return code: 2.