如何使用cygwin和android ndk r5在windows上编译ffmpeg-0.10.3

时间:2013-03-27 16:12:20

标签: android android-ndk ffmpeg cygwin

我想用cygwin和android ndk在windows上编译ffmpeg。 我发现这个链接非常有用,因为有编译ffmpeg的步骤指南。

Does anyone find this useful? - Compiling FFMPEG on Windows with Cywin and NDK r5

但是在最后一点,当我要创建.so文件时,我在cygwin bash中遇到了这个错误。


CONSOLE OUTPUT:

vikram mahal@vikrammahal-PC ~
$ cd /cygdrive/c/ffmpeg-0.10.3
vikram mahal@vikrammahal-PC /cygdrive/c/ffmpeg-0.10.3
$ dos2unix build_android.sh
dos2unix: converting file build_android.sh to Unix format ...
vikram mahal@vikrammahal-PC /cygdrive/c/ffmpeg-0.10.3
$ ./build_android.sh
)/configure: line 10: warning: setlocale: LC_ALL: cannot change locale (C
': not a valid identifierort: `LC_ALL
./configure: line 14: syntax error near unexpected token `$'{\r''
'/configure: line 14: `try_exec(){
./build_android.sh: line 54: make: command not found
./build_android.sh: line 55: make: command not found
C:\android-ndk-r5\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\ar
m-linux-androideabi-ld.exe: cannot open output file ./android/armv7-a/libffmpeg.
so: No such file or directory

1 个答案:

答案 0 :(得分:1)

  

1] ./configure:第14行:意外令牌附近的语法错误`$'{\ r''

要解决此问题,请创建build_android.sh的备份副本并运行

$dos2unix build_android_backup.sh
$sh build_android_backup.sh
  

2] ./build_android.sh:第54行:make:未找到命令

解决上述错误检查,如果您在安装Cygwin时安装了'make'程序