问题描述
ffmpeg的编译与Android NDK R5B。
的ffmpeg 0.6.1
的Android NDK R5B
Cygwin的1.7
建立参考网址:http://www.cnblogs.com/scottwong/archive/2010/12/17/1909455.html
不过,ffmpeg的的./configure结果错误! (以下config.err文件)
check_cc
BEGIN /tmp/ffconf.GlDiY1P8.c
1 INT主要(无效){返回0; }
END /tmp/ffconf.GlDiY1P8.c
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/$p$pbuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o /tmp/ffconf.1kQLpGaU.o的/ tmp / ffconf.GlDiY1P8.c
臂EABI-gcc.exe:/tmp/ffconf.GlDiY1P8.c:没有这样的文件或目录
臂EABI-gcc.exe:没有输入文件
C编译器测试失败。
所以,我只是尝试测试code。
// test.c的code
诠释的main(){
返回0;
}
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/$p$pbuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o ./test.o ./test .C
OK !!!!没有问题的。
不过,CP ./test.c / tmp目录(复制到/ tmp)
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/$p$pbuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o ./test.o的/ tmp / test.c以
ARM-EABI-gcc.exe:/tmp/test.c:没有这样的文件或目录
臂EABI-gcc.exe:没有输入文件
失败!差仅为文件路径。 / tmp目录存在,并且权限是正确的。 /home/test.c是同样的结果。
什么是错的?
我有一个很难得到它的工作在Windows,但最后我已经成功地做到这一点!在previous职位是正确的 - 有一个与Cygwin的路径和Windows路径的问题。我试图在后描述的解决方案上面的第一件事,但它不能正常工作。最后,我已经明白其中的道理:即使你把你的build_android.sh文件的Windows路径,在配置了FFmpeg的仍然包含错误的道路。
所以,在我的情况我已经从FFmpeg的根目录改变部分配置文件:
#设置临时文件名
:$ {TMPDIR:= $ TEMPDIR}
:$ {TMPDIR:= $ TMP}
:$ {TMPDIR:= / tmp目录}
这样:
#设置临时文件名
#:$ {TMPDIR:= $ TEMPDIR}
#:$ {TMPDIR:= $ TMP}
:$ {TMPDIR:= D:/ InstallTools /安卓/ Cygwin_Root / tmp目录}
在此,我把它编译。
compile ffmpeg with android ndk r5b.
ffmpeg 0.6.1
android ndk r5b
cygwin 1.7
build reference url : http://www.cnblogs.com/scottwong/archive/2010/12/17/1909455.html
but, ffmpeg ./configure result error! (below config.err file)
check_cc
BEGIN /tmp/ffconf.GlDiY1P8.c
1 int main(void){ return 0; }
END /tmp/ffconf.GlDiY1P8.c
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o /tmp/ffconf.1kQLpGaU.o /tmp/ffconf.GlDiY1P8.c
arm-eabi-gcc.exe: /tmp/ffconf.GlDiY1P8.c: No such file or directory
arm-eabi-gcc.exe: no input files
C compiler test failed.
so, i just try test code.
// test.c code
int main(){
return 0;
}
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o ./test.o ./test.c
ok!!!! no problem.
but,cp ./test.c /tmp (copy to /tmp)
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o ./test.o /tmp/test.c
arm-eabi-gcc.exe: /tmp/test.c: No such file or directory
arm-eabi-gcc.exe: no input files
fail!!!difference is only file path. /tmp directory exist, and permission is right. /home/test.c is same result.
what's wrong?
I have had a hard time to get it working in Windows, but finally I've managed to do it!The previous posts were correct - there's a problem with Cygwin paths and Windows paths.I have tried the solution described in the post above as the very first thing, but it was not working. Finally I've understand the reason: even if you put into your build_android.sh file the Windows path, the config for FFmpeg still contains the wrong path.
So in my case I have changed partially the config file in FFmpeg root directory from:
#set temporary file name
: ${TMPDIR:=$TEMPDIR}
: ${TMPDIR:=$TMP}
: ${TMPDIR:=/tmp}
to this:
# set temporary file name
#: ${TMPDIR:=$TEMPDIR}
#: ${TMPDIR:=$TMP}
: ${TMPDIR:=D:/InstallTools/Android/Cygwin_Root/tmp}
After this, I got it compiling.
这篇关于与Android NDK R5B编译的ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!