compiling helloworld.c

To compile the helloworld example, use:

       gcc -Wall `gstreamer-config --cflags --libs` helloworld.c \
             -o helloworld 
    

This uses the program gstreamer-config, which comes with GStreamer. This program "knows" what compiler switches are needed to compile programs that use GStreamer. gstreamer-config --cflags will output a list of include directories for the compiler to look in, and gstreamer-config --libs will output the list of libraries for the compiler to link with and the directories to find them in.

You can run the example with (substitute helloworld.mp3 with you favorite MP3 file):

      ./helloworld helloworld.mp3