1<?xml version="1.0"?> 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ 4<!ENTITY % version-entities SYSTEM "version.entities"> 5%version-entities; 6]> 7<refentry id="compiling" revision="17 Jan 2002"> 8<refmeta> 9<refentrytitle>Compiling</refentrytitle> 10<manvolnum>3</manvolnum> 11<refmiscinfo>GStreamer-Base Library</refmiscinfo> 12</refmeta> 13 14<refnamediv> 15<refname>Compiling against the base plugins libraries</refname> 16<refpurpose> 17How to compile against the base plugins libraries 18</refpurpose> 19</refnamediv> 20 21<refsect1> 22<title>Compiling against the base plugins libraries</title> 23 24<para> 25To compile against these libraries, you need to tell the compiler where to 26find the header files and libraries. This is done with the 27<application>pkg-config</application> utility. 28</para> 29<para> 30The following interactive shell session demonstrates how 31<application>pkg-config</application> is used: 32<programlisting> 33$ pkg-config --cflags gstreamer-plugins-base-&GST_API_VERSION; 34-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/gstreamer-&GST_API_VERSION; -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 35$ pkg-config --libs gstreamer-plugins-base-&GST_API_VERSION; 36-Wl,--export-dynamic -pthread -lgstreamer-&GST_API_VERSION; -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0 37</programlisting> 38</para> 39 40<para> 41Note that, because of the number of libraries provided in this package, 42the pkg-config information <emphasis>does not add -l flags</emphasis> itself 43to choose the libraries to link to. You must add these yourself to select 44which of the libraries you want to use. 45</para> 46</refsect1> 47 48</refentry> 49