I used the following...
~/Development/Android/android-ndk-r8c/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/Users/me/toolchain
Then I create the following code file...
int main () { return 0; }
I tried ...
<toolchain>/arm-linux-androideabi-gcc test.c
I also tried
<toolchain>/arm-linux-androideabi-gcc --sysroot=<toolchain>/sysroot test.c
Both come back...
toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
To make it simpler, just set the sysroot:
<toolchain>/arm-linux-androideabi-g++ ~/test.c -o ~/test --sysroot=/home/user/android-ndk/platforms/android-9/arch-arm/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With