File: libgnomeprint-compiling.html

package info (click to toggle)
libgnomeprint 2.18.7-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,048 kB
  • ctags: 4,040
  • sloc: ansic: 35,544; sh: 12,463; xml: 5,177; perl: 562; makefile: 524; yacc: 194; lex: 38
file content (72 lines) | stat: -rw-r--r-- 3,715 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Compiling GNOME Print Applications</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GNOME Print Reference Manual">
<link rel="up" href="libgnomeprint.html" title="Part I. 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.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="libgnomeprint.html" title="Part I. GNOME Print Overview">
<link rel="part" href="libgnomeprintunsorted.html" title="Part II. API Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" 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" title="Compiling GNOME Print Applications">
<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 — 
How to compile your GNOME Print application
</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Compiling GNOME Print Applications on UNIX">
<a name="id2578293"></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
<code class="literal">pkg-config</code> utility.
</p>
<p>
The following interactive shell session demonstrates how
<code class="literal">pkg-config</code> 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>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>