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
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
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/*.othe 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 objectHere 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