ffmpeg linux交叉编译,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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值