/usr/share/gtk-doc/html/libtranslate/ch01s02.html is in libtranslate-dev 0.99-0ubuntu9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Compiling libtranslate Applications</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="libtranslate Reference Manual"><link rel="up" href="overview.html" title="Overview"><link rel="prev" href="overview.html" title="Overview"><link rel="next" href="compiling-modules.html" title="Compiling libtranslate Modules"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}
</style></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="overview.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="overview.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">libtranslate Reference Manual</th><td><a accesskey="n" href="compiling-modules.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2533797"></a>Compiling libtranslate Applications</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2533803"></a>Compiling on UNIX</h3></div></div></div><p>
To compile a libtranslate application, you need to tell the
compiler where to find the libtranslate header files and
libraries. This is done with the
<span><b class="command">pkg-config</b></span> utility.
</p><p>
The following interactive shell session demonstrates how
<span><b class="command">pkg-config</b></span> is used:
</p><pre class="programlisting">$ pkg-config --cflags libtranslate
-I/usr/local/include/libtranslate -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
$ pkg-config --libs libtranslate
-L/usr/local/lib -ltranslate -lgobject-2.0 -lglib-2.0 -liconv</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 libtranslate Hello World, you would type
the following:
</p><pre class="programlisting">$ cc `pkg-config --cflags --libs libtranslate` hello.c -o hello</pre><p>
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2533845"></a>Compiling on UNIX With Autoconf and Automake</h3></div></div></div><p>
To compile a libtranslate application using <a href="http://www.gnu.org/software/autoconf" target="_top">GNU
Autoconf</a> and <a href="http://www.gnu.org/software/automake" target="_top">GNU
Automake</a>, insert the following line at the
appropriate place in the <tt class="filename">configure.ac</tt>
file:
</p><pre class="programlisting">PKG_CHECK_MODULES(LIBTRANSLATE, libtranslate,, [AC_MSG_ERROR([unable to find libtranslate])])</pre><p>
and insert the following lines in the appropriate
<tt class="filename">Makefile.am</tt> file:
</p><pre class="programlisting">bin_PROGRAMS = hello
hello_SOURCES = hello.c
hello_CPPFLAGS = $(LIBTRANSLATE_CFLAGS)
hello_LDFLAGS = $(LIBTRANSLATE_LIBS)</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="overview.html"><b><< Overview</b></a></td><td align="right"><a accesskey="n" href="compiling-modules.html"><b>Compiling libtranslate Modules >></b></a></td></tr></table></body></html>
|