2013-03-27 66 views
1

我想用cygwin和android ndk在windows上编译ffmpeg。 我发现这个链接非常有用,因为有步骤指导编译ffmpeg。如何用cygwin和android编译ffmpeg-0.10.3 ndk r5

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

但在当我要创建.so文件我在Cygwin的bash中得到这个错误最后一个点。


控制台输出:

vikram [email protected] ~ 
$ cd /cygdrive/c/ffmpeg-0.10.3 
vikram [email protected] /cygdrive/c/ffmpeg-0.10.3 
$ dos2unix build_android.sh 
dos2unix: converting file build_android.sh to Unix format ... 
vikram [email protected] /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 
+0

嗨,我使用您的代码进行了备份,但它不工作,现在我安装了make但仍然给出了“make file”错误。 – 2013-03-28 07:08:48

回答

1

1] ./configure: line 14: syntax error near unexpected token `$'{\r''

要解决这个问题,创建build_android.sh的备份和运行

$dos2unix build_android_backup.sh 
$sh build_android_backup.sh 

2] ./build_android.sh: line 54: make: command not found

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

+0

嗨,早些时候我还没有在cygwin中安装make,但现在我安装了make,现在我得到这个错误。 – 2013-03-28 07:05:16

+0

你可以运行“make --version”(不含引号)并验证make是否安装在cygwin中? – asloob 2013-03-28 07:12:30

+0

当我运行使我得到这个错误:-Makefile:2:config.mak:没有这样的文件或目录 Makefile:45:/common.mak:没有这样的文件或目录 Makefile:84:/ libavutil/Makefile:No这样的文件或目录 Makefile:84:/library.mak:没有这样的文件或目录 Makefile:161:/ doc/Makefile:没有这样的文件或目录 Makefile:162:/ tests/Makefile:没有这样的文件或目录 MAKE:***没有规则来做目标'/ tests/Makefile'。停止。 – 2013-03-28 07:15:28