Gstreamer ARM交叉编译

时间:2014-04-28 09:00:42

标签: arm cross-compiling embedded-linux gstreamer

我想为ARM处理器编写嵌入式GStreamer应用程序。我有一个飞思卡尔环境,其中包含已安装的gstream-0.10&交叉编译工具链。 我从GStream手册中获取了第一个Hello World应用程序并尝试通过

进行编译
  

arm-poky-linux-gnueabi-gcc video_1.c -o basic-tutorial-1 pkg-config --cflags --libs gstreamer-0.10

我的gstreamer-0.10.pc包含:

prefix=/home/.../build_mx6q/tmp/sysroots/varsommx6q/usr
exec_prefix=/usr
libdir=/home/.../build_mx6q/tmp/sysroots/varsommx6q/usr/lib
includedir=/home/.../build_mx6q/tmp/sysroots/varsommx6q/usr/include/gstreamer-0.10
toolsdir=${exec_prefix}/bin
pluginsdir=/usr/lib/gstreamer-0.10
datarootdir=${prefix}/share
datadir=${datarootdir}
girdir=${datadir}/gir-1.0
typelibdir=${libdir}/girepository-1.0
Name: GStreamer
Description: Streaming media framework
Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0, libxml-2.0
Version: 0.10.36
Libs: -L${libdir} -lgstreamer-0.10
Cflags: -I${includedir}*

编制结果:

warning: libffi.so.6, needed by /.../usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)
warning: libz.so.1, needed by /.../usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)
/home/.../usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_pointer'
/home/.../usr/lib/libxml2.so: undefined reference to `inflateEnd'
/home/.../usr/lib/libxml2.so: undefined reference to `gzdirect@ZLIB_1.2.2.3'
/home/.../usr/lib/libxml2.so: undefined reference to `gzclose'
/home/.../usr/lib/libxml2.so: undefined reference to `deflate'
/home/.../usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_float'
/home/.../usr/lib/libxml2.so: undefined reference to `inflateInit2_'
/home/.../usr/lib/libxml2.so: undefined reference to `inflate'
/home/.../usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_void'
/home/.../usr/lib/libxml2.so: undefined reference to `gzwrite'
/home/.../usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_sint64'
/home/.../usr/lib/libxml2.so: undefined reference to `crc32'
/home/.../usr/lib/libxml2.so: undefined reference to `deflateEnd'
...
collect2: error: ld returned 1 exit status

出了点问题,但我不明白在哪里和哪里。 我还需要帮助。 谢谢。

1 个答案:

答案 0 :(得分:0)

试试这个

arm-poky-linux-gnueabi-gcc video_1.c -o basic-tutorial-1`pkg-config --cflags --libs gstreamer-0.10`