交叉编译gstreamer

编译gstreamer 1.3.2 gst-plugins-base-1.3.2 gst-plugins-good-1.3.2 gst-plugins-bad-1.3.2 gst-plugins-ugly-1.3.2

export PKG_CONFIG_PATH=/home/nap/xselib/sysroot-xse-j6-sgm358/usr/lib/pkgconfig
export PATH="/home/nap/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin":$PATH
export CFLAGS="-I/home/nap/xselib/sysroot-xse-j6-sgm358/usr/include -I/home/nap/xselib/sysroot-xse-j6-sgm358/usr/include/glib-2.0 -I/home/nap/xselib/sysroot-xse-j6-sgm358/usr/include/gstreamer-1.0 -I/home/nap/xselib/sysroot-xse-j6-sgm358/usr/lib/glib-2.0/include"
export LDFLAGS="-L/home/nap/xselib/sysroot-xse-j6-sgm358/usr/lib -lffi -lglib-2.0 -lz -L/home/nap/xselib/gstreamer-lib"
export CC=arm-linux-gnueabihf-gcc
./configure --build=i686-linux --host=arm-linux-gnueabihf --prefix=/home/nap/xselib/sysroot-xse-j6-sgm358/usr --disable-largefile --disable-fatal-warnings --with-sysroot=/home/nap/xselib/sysroot-xse-j6-sgm358

基本就是上面的命令,期间可能还会遇到某个头文件找不到的错误,自己手动拷贝到当前文件夹就可以了,有些库找不到的错误需要自己修改Makefile,基本就是改CFLAGS就行,加上-lxxx 就可以了。
如果提示某个宏未定义就需要去找源代码了,需要手动在未定义的地方加上,因为有时候这些头文件包含了但是还会提示这些错误,不知道为什么。
上面的configure选项大家可以敲 ./configure --help 查看,我翻译过来容易走样。
注:上面的库要先编译gstreamer然后base
另外三个要依赖于这两个库
有其他的问题再一起研究

gstreamer-0.10.36
./configure --build=i686-linux --host=arm-linux-gnueabihf --prefix=/home/nap/xselib/gstreamer-lib --disable-largefile --disable-fatal-warnings --with-sysroot=/home/nap/xselib/sysroot-xse-j6-sgm358

gst-plugin-base-0.10.36
./configure --build=i686-linux --host=arm-linux-gnueabihf --prefix=/home/nap/xselib/gst-plugin-base-lib --disable-largefile --disable-fatal-warnings --with-sysroot=/home/nap/xselib/sysroot-xse-j6-sgm358 --disable-ogg \
--disable-oggtest  --disable-vorbis  --disable-vorbistest --disable-x --disable-xvideo --disable-xshm

编译gst-ffmpeg-lib 0.10.36
./configure --build=i686-linux --host=arm-linux-gnueabihf --prefix=/home/nap/xselib/gst-ffmpeg-lib --disable-largefile --disable-fatal-warnings --with-sysroot=/home/nap/xselib/sysroot-xse-j6-sgm358 --with-ffmpeg-extra-configure=--cc=arm-linux-gnueabihf-gcc --enable-shared --enable-gpl --enable-pthreads --prefix=/home/nap/xselib/libavffmpeg --enable-cross-compile --host-cc=gcc --arch=arm --target-os=linux


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值