3

I am trying to compile bash file(ffmpeg with android ndk).I get error like this:

.../arm-linux-androideabi-gcc is unalbe to create executable file.C compiler test failed. Makefile:2: config.mak:No such file or directory Makefile:59: /common.mak:No such file file or directory ....

my build_android.sh file:

#!/bin/bash 
NDK=C:/ndk/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/ 
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/windows 
function build_one
{
./configure \
    --prefix=$PREFIX \
    --enable-shared \
    --disable-static \
    --disable-doc \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --disable-avdevice \
    --disable-doc \
    --disable-symver \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=linux \
    --arch=arm \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
    --extra-ldflags="$ADDI_LDFLAGS" \
    $ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU 
ADDI_CFLAGS="-marm"
build_one
Ina
  • 31
  • 1
  • 1
    You need a cross compiling process which replaces some of the checks made when compiling for the build machine. You probably don't want to sort this out from scratch, rather find one of the many existing writeups/projects. Finally, while it is not your immediate problem, windows is by far the least suited of the three supported platforms for Android work, *especially* where the NDK and legacy unix codebases are concerned. – Chris Stratton Mar 11 '15 at 14:09
  • possible duplicate of [Using FFmpeg with Android-NDK](http://stackoverflow.com/questions/9605757/using-ffmpeg-with-android-ndk) – Alex Cohn Mar 11 '15 at 14:22

0 Answers0