compiling.sgml 1.72 KB
Newer Older
Stefan Kost's avatar
Stefan Kost committed
1 2 3 4 5 6
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % version-entities SYSTEM "version.entities">
%version-entities;
]>
7 8 9 10
<refentry id="compiling" revision="17 Jan 2002">
<refmeta>
<refentrytitle>Compiling</refentrytitle>
<manvolnum>3</manvolnum>
11
<refmiscinfo>GStreamer-Base Library</refmiscinfo>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
</refmeta>

<refnamediv>
<refname>Compiling against the base plugins libraries</refname>
<refpurpose>
How to compile against the base plugins libraries
</refpurpose>
</refnamediv>

<refsect1>
<title>Compiling against the base plugins libraries</title>

<para>
To compile against these libraries, you need to tell the compiler where to 
find the header files and libraries. This is done with the
<application>pkg-config</application> utility.
</para>
<para>
The following interactive shell session demonstrates how
<application>pkg-config</application> is used:
<programlisting>
33 34 35 36
$ pkg-config --cflags gstreamer-plugins-base-&GST_API_VERSION;
-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
$ pkg-config --libs gstreamer-plugins-base-&GST_API_VERSION;
-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 38 39 40 41 42 43 44 45 46 47 48
</programlisting>
</para>

<para>
Note that, because of the number of libraries provided in this package,
the pkg-config information <emphasis>does not add -l flags</emphasis> itself
to choose the libraries to link to.  You must add these yourself to select
which of the libraries you want to use.
</para>
</refsect1>

</refentry>