2014-04-28 344 views
2

我想爲ARM處理器編寫嵌入式GStreamer應用程序。我有一個飛思卡爾環境,其中包含安裝的gstream-0.10 &交叉編譯工具鏈。 我從GStream手動採取了第一個Hello World應用程序,並試圖通過編譯它Gstream ARM交叉編譯

臂狹小-Linux的gnueabi-GCC video_1.c -o基本教程-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 `[email protected]_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 

出錯了,但我不明白在哪裏和在哪裏。 我仍然需要幫助。 謝謝。

+0

的警告,說你還需要libffi和libz。你有所有的依賴關係嗎? –

+0

是的,這是正確的。我將libffi添加到gstreamer-0.10.pc中的Requires中,並將-lz添加到命令行中。 – Shimon

回答

0

試試這個

臂狹小-Linux的gnueabi-GCC video_1.c -o基本教程-1'pkg配置--cflags --libs的GStreamer-0.10`