ubuntu+gstreamer 简单的mp3实现

在ubuntu下,gstreamer的很多核心库已经安装,在新力德中查看。

并参考了 http://www.cnblogs.com/phinecos/archive/2009/06/07/1498166.html

编译运行时,遇到了几个问题

gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) -g test2.c -o test2

以上是参考博客中的但是在自己的机器上时遇到了如下错误: undefined reference to “xxxxx” 这说明有链接库没有链接,首先想到在以上命令中加上 -lgstreamer-0.10

运行后还是有错误,但是错误类似,自己建立一些软链接就好。

gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) mp4.c -lgstreamer-0.10 -lgobject-2.0 -lglib-2.0 -o test

在这篇文章中(http://www.cnblogs.com/benio/archive/2010/10/25/1860394.html)

对比一下gcc中-l与-L。

此外介绍一下关于gstreamer的文章http://www.ibm.com/developerworks/cn/linux/l-gstreamer/

原文地址:https://www.cnblogs.com/yujinghui/p/2965229.html