linux arm ffmpeg configure文件,ffmpeg库的交叉编译记录
系統信息:Ubuntu
Release 10.04
主機編譯器版本:
liwei@liwei:~$
gcc -v
Using
built-in specs.
Target:
i486-linux-gnu
… … … …
gcc
version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
交叉編譯器版本:
liwei@liwei:~$
arm-linux-gcc -v
Using
built-in specs.
Target:
arm-linux-uclibc
… … … …
gcc
version 4.2.1
1.進入到ffmpeg目錄中用以下方式配置:
$
./configure --arch=arm --target-os=linux --cc=arm-linux-gcc --enable-cross-compile --enable-shared --disable-network
--disable-armv6 --disable-armv6t2 --disable-ffmpeg
--disable-ffplay --disable-ffserver --enable-avfilter --enable-gpl
--enable-swscale --enable-postproc --enable-gpl --enable-pthreads
出現如下問題:
Must
specify target arch and OS when cross-compiling
If
you think configure made a mistake, make sure you are using the
latest
version
from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org
mailing list or IRC #ffmpeg on irc.freenode.net.
Include
the log file "config.log" produced by configure as this
will help
solving
the problem.
通過./configure
–help找到相關配置選項,傳遞linux給此選項,配置通過
2.拷貝目標文件:
拷貝如下頭文件到/home/liwei/ffmpeg_install/include(實際為安裝解碼庫時安裝到系統目錄下的頭文件)
/usr/local/include/*
拷貝如下動態庫文件到/home/liwei/ffmpeg_install/lib:
ffmpeg/libavcodec/libavcodec.so.53
ffmpeg/libavfilter/libavfilter.so.2
ffmpeg/libpostproc/libpostproc.so.52
ffmpeg/libavformat/libavformat.so.53
ffmpeg/libswresample/libswresample.so.0
ffmpeg/libavdevice/libavdevice.so.53
ffmpeg/libavutil/libavutil.so.51
ffmpeg/libswscale/libswscale.so.2
拷貝如下靜態庫文件到/home/liwei/ffmpeg_install/lib:
ffmpeg/libavcodec/libavcodec.a
ffmpeg/libavfilter/libavfilter.a
ffmpeg/libpostproc/libpostproc.a
ffmpeg/libavformat/libavformat.a
ffmpeg/libswresample/libswresample.a
ffmpeg/libavdevice/libavdevice.a
ffmpeg/libavutil/libavutil.a
ffmpeg/libswscale/libswscale.a
用arm-linux-strip工具去除動態庫中的調試信息:
$cd
/home/liwei/ffmpeg_install/lib/
$
arm-linux-strip *.so
總結
以上是生活随笔為你收集整理的linux arm ffmpeg configure文件,ffmpeg库的交叉编译记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA查看源码时总是出现.class而
- 下一篇: linux 其他常用命令