Cocos Creator 3 build with sdkbox failed – Cocos Creator


Hi all, I added IAP plugin to the cocos creator project and getting error while make project:

  FAILED: D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/build/android/proj/build/Google_Play_Template_ADS_and_Purchase/intermediates/cmake/release/obj/armeabi-v7a/libcocos.so 
  cmd.exe /C "cd . && C:UsershorchAppDataLocalAndroidSdkndk21.1.6352462toolchainsllvmprebuiltwindows-x86_64binclang++.exe --target=armv7-none-linux-androideabi21 --gcc-toolchain=C:/Users/horch/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/horch/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -frtti -fexceptions -fsigned-char -Oz -DNDEBUG  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libcocos.so -o D:my_workcocos_creatorprojectsGoogle_Play_Template_ADS_and_PurchasebuildandroidprojbuildGoogle_Play_Template_ADS_and_Purchaseintermediatescmakereleaseobjarmeabi-v7alibcocos.so @CMakeFiles/cocos.rsp  && cd ."
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::onRestoreComplete(bool, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::getInstance()'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::onRestoreComplete(bool, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::postEvent(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, void*)'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::__notifyByProduct(sdkbox::Product const&): error: undefined reference to 'sdkbox::EventManager::getInstance()'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::__notifyByProduct(sdkbox::Product const&): error: undefined reference to 'sdkbox::EventManager::postEvent(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, void*)'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::onPurchaseResult(sdkbox::PayResultCode, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::getInstance()'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::onPurchaseResult(sdkbox::PayResultCode, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::postEvent(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, void*)'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::onPurchaseResult(sdkbox::PayResultCode, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::postEvent(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, void*)'
  D:/my_work/cocos_creator/projects/Google_Play_Template_ADS_and_Purchase/native/engine/android/app/jni/PluginIAP/libs_c++_static/armeabi-v7a/libPluginIAP.a(IAPWrapper.o):function sdkbox::IAPWrapperEnabled::purchase(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&): error: undefined reference to 'sdkbox::EventManager::getInstance()'
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.



Source link

More To Explore

Share on facebook
Share on twitter
Share on linkedin
Share on email