File: libgnomeprint-compiling.html

package info (click to toggle)
libgnomeprint 2.8.2-1.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,272 kB
  • ctags: 3,313
  • sloc: ansic: 29,811; sh: 8,353; xml: 4,906; perl: 562; makefile: 434
file content (25 lines) | stat: -rw-r--r-- 3,836 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Compiling GNOME Print Applications</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="GNOME Print Reference Manual"><link rel="up" href="libgnomeprint.html" title="PartI.GNOME Print Overview"><link rel="prev" href="libgnomeprint-building.html" title="Compiling the GNOME Print library"><link rel="next" href="libgnomeprint-resources.html" title="Mailing lists and bug reports"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="libgnomeprint.html" title="PartI.GNOME Print Overview"><link rel="part" href="libgnomeprintunsorted.html" title="PartII.API Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libgnomeprint-building.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgnomeprint.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GNOME Print Reference Manual</th><td><a accesskey="n" href="libgnomeprint-resources.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="libgnomeprint-compiling"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">Compiling GNOME Print Applications</span></h2><p>Compiling GNOME Print Applications &#8212; 
How to compile your GNOME Print application
</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsect1" lang="en"><a name="id2527005"></a><h2>Compiling GNOME Print Applications on UNIX</h2><p>
To compile a GNOME Print application, you need to tell the compiler where to 
find the GNOME Print header files and libraries. This is done with the
<tt class="literal">pkg-config</tt> utility.
</p><p>
The following interactive shell session demonstrates how
<tt class="literal">pkg-config</tt> is used:
</p><pre class="programlisting">
$ pkg-config --cflags libgnomeprint-2.2
-I/home/chema/cvs/gnome2/include/libgnomeprint-2.2 -I/home/chema/cvs/gnome2/include/libart-2.0 -I/home/chema/cvs/gnome2/include/glib-2.0 -I/home/chema/cvs/gnome2/lib/glib-2.0/include -I/home/chema/cvs/gnome2/include/libxml2 -I/home/chema/cvs/gnome2/include/pango-1.0
$ pkg-config --libs libgnomeprint-2.2
-Wl,--export-dynamic -L/home/chema/cvs/gnome2/lib -lgnomeprint-2-2 -lart_lgpl_2 -lxml2 -lz -lm -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
</pre><p>
</p><p>
The simplest way to compile a program is to use the "backticks"
feature of the shell. If you enclose a command in backticks
(<span class="emphasis"><em>not single quotes</em></span>), then its output will be
substituted into the command line before execution. So to compile 
a simple libgnomeprint program, you would type the following:
</p><pre class="programlisting">
$ cc `pkg-config --cflags --libs libgnomeprint-2.2` gnome-print-sample.c -o gnome-print-sample
</pre><p>
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libgnomeprint-building.html"><b>&lt;&lt;Compiling the GNOME Print library</b></a></td><td align="right"><a accesskey="n" href="libgnomeprint-resources.html"><b>Mailing lists and bug reports&gt;&gt;</b></a></td></tr></table></body></html>