add notes on pkg-config
[platform/upstream/gstreamer.git] / docs / libs / compiling.sgml
1 <refentry id="compiling" revision="17 Jan 2002">
2 <refmeta>
3 <refentrytitle>Compiling</refentrytitle>
4 <manvolnum>3</manvolnum>
5 <refmiscinfo>GLib Library</refmiscinfo>
6 </refmeta>
7
8 <refnamediv>
9 <refname>Compiling against the base plugins libraries</refname>
10 <refpurpose>
11 How to compile against the base plugins libraries
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Compiling against the base plugins libraries</title>
17
18 <para>
19 To compile against these libraries, you need to tell the compiler where to 
20 find the header files and libraries. This is done with the
21 <application>pkg-config</application> utility.
22 </para>
23 <para>
24 The following interactive shell session demonstrates how
25 <application>pkg-config</application> is used:
26 <programlisting>
27 $ pk-gconfig --cflags gstreamer-plugins-base-&GST_MAJORMINOR;
28 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/gstreamer-&GST_MAJORMINOR; -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
29 $ pkg-config --libs gstreamer-plugins-base-&GST_MAJORMINOR;
30 -Wl,--export-dynamic -pthread -lgstreamer-&GST_MAJORMINOR; -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0
31 </programlisting>
32 </para>
33
34 <para>
35 Note that, because of the number of libraries provided in this package,
36 the pkg-config information <emphasis>does not add -l flags</emphasis> itself
37 to choose the libraries to link to.  You must add these yourself to select
38 which of the libraries you want to use.
39 </para>
40 </refsect1>
41
42 </refentry>