Clang++ error on armeabi-v7a/libPluginIAP.a

Clang++ error on armeabi-v7a/libPluginIAP.a
0

I got this compile error, my building environment is cocos2dx v3.17.1, SDKBox Plugin version 2.5.0.5. The weird thing is such error arises on release mode only.

jni/../../../Modules/SDKBox_Module/prebuilt/android/armeabi-v7a/libPluginIAP.a(IAPWrapper-android.o):function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::~basic_stringstream(): warning: relocation refers to discarded section
/Users/ichinfungi/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: treating warnings as errors
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libcocos2dcpp.so] Error 1
make: *** Waiting for unfinished jobs....

@yinjimmy Please kindly take a look, many thanks.

It looks like you use a custom folder structure .

whats armeabi-v7a ? from libs(gnustd) or c++_static ?

what NDK version do you use?

I put the libraries downloaded from SDKBox’s website in corresponding architectures’ directories, in which I use c++_static. I am using NDK version 20.1.5948944.

What about NDK r14b or r16?

The SDKBox’s SDK compiled with r14b.

Still got the same error on building with r16b, I think I encountered exactly the same problem in this thread:

There is a new bug in IAP.

fixed with PluginIAP.zip (563.5 KB)

Thanks for your feedback.

It works. Thank you very much.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.