@kencoder wrote:
Hi all,
I tried several time to build my game in Android. (okay in my mackbook but fail in my iMac)
Here are the configurations:
NDK Version: r9
Cocos2d-x: 3.10
SDKBOX: The latest (2.2.2.10)
Plugins: iap, sdkboxplay, googleanalyticsHere is the Android.mk
Android.mk.h (1.2 KB)The error appear is as follows: (I know it's linker error, but still don't know where causing it)
make: Entering directory `/Users/Calvin/project/cocos2dx/project/GhostLeg/proj.android-studio/app' StaticLibrary : libcocos2d.a StaticLibrary : libcocostudio.a StaticLibrary : libcocosbuilder.a StaticLibrary : libcocos3d.a StaticLibrary : libspine.a StaticLibrary : libui.a StaticLibrary : libcocosdenshion.a StaticLibrary : flatbuffers.a StaticLibrary : libextension.a StaticLibrary : libaudioengine.a StaticLibrary : libbox2d.a StaticLibrary : libnetwork.a StaticLibrary : libcocos2dxinternal.a StaticLibrary : librecast.a StaticLibrary : libbullet.a StaticLibrary : libcocos2dandroid.a StaticLibrary : libcpufeatures.a Gdbserver : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup SharedLibrary : libcocos2dcpp.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()' jni/src/IAPProxy.cpp:25: error: undefined reference to 'sdkbox::SdkboxCore::getMetadata(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' ../../core/include/bridge.h:313: error: undefined reference to 'sdkbox::JNIUtils::NewMap(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, _JNIEnv*)' jni/src/IAPWrapper-android.cpp:78: error: undefined reference to 'sdkbox::Logger::GetLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/src/IAPWrapper-android.cpp:99: error: undefined reference to 'sdkbox::EventManager::postEvent(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)' jni/src/IAPWrapper-android.cpp:100: error: undefined reference to 'sdkbox::SdkboxCore::track(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sdkbox::Json const&)' jni/src/IAPWrapper-android.cpp:70: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/src/IAPWrapper-android.cpp:71: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/src/IAPWrapper-android.cpp:72: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/../../share/IAPHelper.cpp:27: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/../../share/IAPHelper.cpp:65: error: undefined reference to 'sdkbox::Json::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' ./obj/local/armeabi/libcocos3d.a(CCMeshSkin.o):CCMeshSkin.cpp:function std::vector<cocos2d::Mat4, std::allocator<cocos2d::Mat4> >::_M_range_check(unsigned int) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' ./obj/local/armeabi/libcocos2dxinternal.a(CCActionCatmullRom.o):CCActionCatmullRom.cpp:function std::vector<cocos2d::Vec2*, std::allocator<cocos2d::Vec2*> >::_M_range_check(unsigned int) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' ./obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/__/Classes/Manager/IAPManager.o:IAPManager.cpp:function IAPManager::purchase(std::string const&): error: undefined reference to 'sdkbox::IAP::purchase(std::string const&)' ./obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/__/Classes/SimpleTDD/TDDSuite.o:TDDSuite.cpp:function std::vector<int, std::allocator<int> >::_M_range_check(unsigned int) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' /usr/local/Cellar/android-ndk/r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:220: error: undefined reference to 'std::__1::locale::~locale()' /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()' jni/../../share/IAPWrapper.cpp:21: error: undefined reference to 'sdkbox::SdkboxCore::isEnabled(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/../../share/IAPWrapper.cpp:27: error: undefined reference to 'sdkbox::Logger::GetLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' /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/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:534: 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:534: 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: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' jni/../../share/IAPWrapper.cpp:309: error: undefined reference to 'sdkbox::EventManager::postEvent(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)' jni/../../share/IAPWrapper.cpp:311: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/../../share/IAPWrapper.cpp:312: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/../../share/IAPWrapper.cpp:313: error: undefined reference to 'sdkbox::SdkboxCore::track(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sdkbox::Json const&)' jni/../../share/IAPWrapper.cpp:379: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/../../share/IAPWrapper.cpp:380: error: undefined reference to 'sdkbox::Json::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/../../share/IAPWrapper.cpp:127: error: undefined reference to 'sdkbox::EventManager::postEvent(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)' jni/../../share/IAPWrapper.cpp:136: error: undefined reference to 'sdkbox::SdkboxCore::track(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sdkbox::Json const&)' jni/../../share/IAPWrapper.cpp:142: error: undefined reference to 'sdkbox::EventManager::postEvent(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)' jni/../../share/IAPWrapper.cpp:151: error: undefined reference to 'sdkbox::SdkboxCore::track(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sdkbox::Json const&)' jni/../../share/IAPWrapper.cpp:51: error: undefined reference to 'sdkbox::SdkboxCore::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const' jni/../../share/IAPWrapper.cpp:58: error: undefined reference to 'sdkbox::Logger::GetLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/../../share/IAPWrapper.cpp:91: error: undefined reference to 'sdkbox::SdkboxCore::addPlugin(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' /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/../../share/IAPWrapper.cpp:233: error: undefined reference to 'sdkbox::Logger::GetLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' jni/./pluginiap/libs/armeabi/libPluginIAP.a(IAPWrapper.o):IAPWrapper.cpp:function typeinfo for std::__1::basic_ios<char, std::__1::char_traits<char> >: error: undefined reference to 'typeinfo for std::__1::ios_base' ./obj/local/armeabi/libcocostudio.a(CCArmature.o):CCArmature.cpp:function std::vector<std::string, std::allocator<std::string> >::_M_range_check(unsigned int) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' collect2: error: ld returned 1 exit status make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1 make: Leaving directory `/Users/Calvin/project/cocos2dx/project/GhostLeg/proj.android-studio/app'
Posts: 1
Participants: 1