You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
Hello,
first of all thanks for your great tutorial
I have a native library to compile for Android and iOS.
In iOS I dont have problems, but for Android I have that when I call this line:
the script return me this error: /Users/user/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: /Progetti/_InimSDK/PrimeAPIMobile/PrimeFuncsLib/tmp/sourceFilesAndroid/seriale.o: relocation R_386_GOTOFF against preemptible symbol app_data cannot be used when making a shared object
Here I read that it shoud be a problem on the latest ndk
Anyway I add -fPIC for cpp compiling and now the so files are generated
for i2 in $LibPath/*.cpp; do
ShortName="${i2##*/}"
OutputName="${ShortName/cpp/o}"
$CXX -c $i2 -std=c++0x -fPIC -D __MYblabla__ -o ${PWD}/sourceFilesAndroid/$OutputName
done
$CXX -shared -static-libstdc++ -o ${PWD}/sourceFilesAndroid/lib${LibraryName}.so ${PWD}/sourceFilesAndroid/*.o
Hope it can helps other users
Thanks
The text was updated successfully, but these errors were encountered:
Thanks for sharing @matteopiccioni and it's great to hear the tutorial was helpful to you. I'll keep the issue open until I can fully investigate and update the tutorial accordingly.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
first of all thanks for your great tutorial
I have a native library to compile for Android and iOS.
In iOS I dont have problems, but for Android I have that when I call this line:
$CXX -shared -static-libstdc++ -o ${PWD}/sourceFilesAndroid/lib${LibraryName}.so ${PWD}/sourceFilesAndroid/*.o
the script return me this error:
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: /Progetti/_InimSDK/PrimeAPIMobile/PrimeFuncsLib/tmp/sourceFilesAndroid/seriale.o: relocation R_386_GOTOFF against preemptible symbol app_data cannot be used when making a shared object
Here I read that it shoud be a problem on the latest ndk
Anyway I add -fPIC for cpp compiling and now the so files are generated
Hope it can helps other users
Thanks
The text was updated successfully, but these errors were encountered: