nul*_*ull 7 android ffmpeg configure android-ndk
使用android ndk r5b编译ffmpeg.
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 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.
Run Code Online (Sandbox Code Playgroud)
所以,我只是尝试测试代码.
// test.c code
int main(){
return 0;
}
Run Code Online (Sandbox Code Playgroud)
/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/windows/bin/arm-eabi-gcc -fPIC -DANDROID -c -o ./test.o ./test.c
好!!!!没问题.
但是,cp ./test.c/tmp(复制到/ 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
Run Code Online (Sandbox Code Playgroud)
失败!!!差异只是文件路径./ tmp目录存在,权限是对的./home/test.c是相同的结果.
怎么了?
我很难在Windows中使用它,但最后我成功了!以前的帖子是正确的 - Cygwin路径和Windows路径存在问题.我已经尝试过上面帖子中描述的解决方案作为第一件事,但它没有用.最后我明白了原因:即使你将build_android.sh文件放入Windows路径,FFmpeg的配置仍然包含错误的路径.
所以在我的情况下,我已经部分改变了FFmpeg根目录中的配置文件:
#set temporary file name
: ${TMPDIR:=$TEMPDIR}
: ${TMPDIR:=$TMP}
: ${TMPDIR:=/tmp}
Run Code Online (Sandbox Code Playgroud)
对此:
# set temporary file name
#: ${TMPDIR:=$TEMPDIR}
#: ${TMPDIR:=$TMP}
: ${TMPDIR:=D:/InstallTools/Android/Cygwin_Root/tmp}
Run Code Online (Sandbox Code Playgroud)
在此之后,我得到了编译.
| 归档时间: |
|
| 查看次数: |
8405 次 |
| 最近记录: |