Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / html / gmime-compiling.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Compiling GMime Applications</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
8 <link rel="up" href="gmime.html" title="Part I. GMime Overview">
9 <link rel="prev" href="gmime-building.html" title="Compiling the GMime libraries">
10 <link rel="next" href="gmime-changes-2-0.html" title="Changes from 1.0 to 2.0">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16 <td><a accesskey="p" href="gmime-building.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="gmime.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
20 <td><a accesskey="n" href="gmime-changes-2-0.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr></table>
22 <div class="refentry">
23 <a name="gmime-compiling"></a><div class="titlepage"></div>
24 <div class="refnamediv"><table width="100%"><tr>
25 <td valign="top">
26 <h2><span class="refentrytitle">Compiling GMime Applications</span></h2>
27 <p>Compiling GMime Applications — 
28 How to compile your GMime application
29 </p>
30 </td>
31 <td valign="top" align="right"></td>
32 </tr></table></div>
33 <div class="refsect1">
34 <a name="idp4948864"></a><h2>Compiling GMime Applications on UNIX</h2>
35 <p>
36 To compile a GMime application, you need to tell the compiler where to 
37 find the GMime header files and libraries. This is done with the
38 <code class="literal">pkg-config</code> utility.
39 </p>
40 <p>
41 The following interactive shell session demonstrates how
42 <code class="literal">pkg-config</code> is used:
43 </p>
44 <pre class="programlisting">
45 $ pkg-config --cflags gmime-2.4
46  -I/usr/include/gmime-2.4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
47 $ pkg-config --libs gmime-2.4
48  -L/opt/gnome2/lib -lgmime-2.4 -lnsl -lgobject-2.0 -lglib-2.0
49 </pre>
50 <p>
51 </p>
52 <p>
53 The simplest way to compile a program is to use the "backticks"
54 feature of the shell. If you enclose a command in backticks
55 (<span class="emphasis"><em>not single quotes</em></span>), then its output will be
56 substituted into the command line before execution. So to compile 
57 a GTK+ Hello, World, you would type the following:
58 </p>
59 <pre class="programlisting">
60 $ cc `pkg-config --cflags --libs gmime-2.4` hello.c -o hello
61 </pre>
62 <p>
63 </p>
64 </div>
65 </div>
66 <div class="footer">
67 <hr>
68           Generated by GTK-Doc V1.18</div>
69 </body>
70 </html>