Command line for compiling

Tim Müller tim at centricular.com
Tue Dec 17 15:02:47 PST 2013


On Tue, 2013-12-17 at 21:30 +0000, Ian Davidson wrote:

Hi Ian,

> I have previously written a 'console type' GStreamer application which 
> works nicely - but my 'user audience' would prefer something a little 
> more 'GUI'.  So I am having to recompile with a GUI interface.
> 
> When I complied my original program, I used a command line such as
> gcc -Wall foo.c -o foo $(pkg-config --cflags --libs gstreamer-1.0)
> 
> When I started to experiment with my GUI interface (and before I 
> included the GStreamer stuff) I compiled with a command such as
> gcc -Wall -g bar.c -o bar `gtk-config --cflags`  `gtk-config --libs`
> 
> When I add the GStreamer stuff, how do I need to modify the command line 
> so as to allow both GTK and GStreamer?

So, first of all, if I'm not mistaken your use of gtk-config implies
that you are using an ancient version of Gtk+, namely Gtk+ 1.2. Is this
correct? This would then also use an ancient GLib 1.2, which is not
API/ABI compatible with modern GLib/Gtk applications, and you can't use
GStreamer 1.0 (or 0.10 or 0.8) with GLib 1.2, only with GLib 2.0. But I
might be mistaken about all of this of course.

So in any case, make sure to use either Gtk+ 2.x or 3.x which both use
GLib 2.x. Then what should work is:

gcc -Wall foo.c -o foo $(pkg-config --cflags --libs gstreamer-1.0 gtk
+-3.0)

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com






More information about the gstreamer-devel mailing list