Hi, I am starting to develop ndk applications.
I was about to create a sample application , but I received the following errors when compiling my own code using the ndk-build command.
I am using UBUNTU OS.
nidhi@php-pc1:~/android-sdk-linux_x86/android-ndk-r7/samples/hello-jni$ /home/nidhi/android-sdk-linux_x86/android-ndk-r7/ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1
please help me decide ..
Edit:
I solve this with set PATH
export PATH = $ PATH: /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2
but a new error appears
`
android-sdk-linux_x86/android-ndk-r7/samples/hello-jni$ /home/nidhi/android-sdk-linux_x86/android-ndk-r7/ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
cc1: error: unrecognized command line option "-mbionic"
cc1: error: unrecognized command line option "-mthumb"
cc1: error: unrecognized command line option "-mfpu=vfp"
jni/hello-jni.c:1:0: error: bad value (armv5te) for -march= switch
jni/hello-jni.c:1:0: error: bad value (xscale) for -mtune= switch
make: *** [obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1
Help for pls.
Edit:
it is resolved with set Cross complier PATH
export CROSS_COMPILER = $ PATH: / home / nidhi / android-sdk-linux_x86 / android-ndk-r7 / prebuilt / linux-x86 / bin /
source
share