Compiling against the base plugins libraries — How to compile against the base plugins libraries
Compiling against the base plugins libraries
To compile against these libraries, you need to tell the compiler where to find the header files and libraries. This is done with the pkg-config utility.
The following interactive shell session demonstrates how pkg-config is used:
$ pkg-config --cflags gstreamer-plugins-base-1.0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 $ pkg-config --libs gstreamer-plugins-base-1.0 -Wl,--export-dynamic -pthread -lgstreamer-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0
Note that, because of the number of libraries provided in this package, the pkg-config information does not add -l flags itself to choose the libraries to link to. You must add these yourself to select which of the libraries you want to use.