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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="highlight.min.css">
<script src="highlight.min.js"></script><script>
hljs.configure({languages: ['cpp']});
hljs.highlightAll();
</script><title>Unix and Linux</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Programming with gtkmm 4">
<link rel="up" href="chapter-installation.html" title="Chapter 2. Installation">
<link rel="prev" href="chapter-installation.html" title="Chapter 2. Installation">
<link rel="next" href="sec-packages-windows.html" title="Microsoft Windows">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Unix and Linux</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="chapter-installation.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<th width="60%" align="center">Chapter 2. Installation</th>
<td width="20%" align="right"> <a accesskey="n" href="sec-packages-windows.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sec-install-unix-and-linux"></a>Unix and Linux</h2></div></div></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="sec-linux-install-from-packages"></a>Prebuilt Packages</h3></div></div></div>
<p>
Recent versions of <span class="application">gtkmm</span> are packaged by nearly every major Linux
distribution these days. So, if you use Linux, you can probably get
started with <span class="application">gtkmm</span> by installing the package from the official repository
for your distribution. Distributions that include <span class="application">gtkmm</span> in their
repositories include Debian, Ubuntu, Red Hat, Fedora, Mandriva, Suse, and
many others.
</p>
<p>
The names of the <span class="application">gtkmm</span> packages vary from distribution to distribution
(e.g. <span class="application">libgtkmm-4.0-dev</span> on Debian and Ubuntu or
<span class="application">gtkmm4.0-devel</span> on Red Hat and Fedora), so check
with your distribution's package management program for the correct package
name and install it like you would any other package.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="icons/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
The package names will not change when new API/ABI-compatible versions of <span class="application">gtkmm</span>
are released. Otherwise they would not be API/ABI-compatible. So don't be
surprised, for instance, to find <span class="application">gtkmm</span> 4.8 supplied by Debian's
<span class="application">libgtkmm-4.0-dev</span> package.
</p>
</td></tr>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="sec-install-from-source"></a>Installing From Source</h3></div></div></div>
<p>
If your distribution does not provide a pre-built <span class="application">gtkmm</span> package, or if you
want to install a different version than the one provided by your distribution,
you can also install <span class="application">gtkmm</span> from source. The source code for <span class="application">gtkmm</span> can
be downloaded from <a class="ulink" href="https://download.gnome.org/sources/gtkmm/" target="_top">https://download.gnome.org/sources/gtkmm/</a>.
</p>
<p>
After you've installed all of the dependencies, download the <span class="application">gtkmm</span> source
code, unpack it, and change to the newly created directory. <span class="application">gtkmm</span> can be
built with Meson. See the <code class="filename">README</code> file in the <span class="application">gtkmm</span> version
you've downloaded.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="icons/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
Remember that on a Unix or Linux operating system, you will probably need to
be <code class="literal">root</code> to install software. The <span class="command"><strong>su</strong></span> or <span class="command"><strong>sudo</strong></span>
command will allow you to enter the <code class="literal">root</code> password and have
<code class="literal">root</code> status temporarily.
</p>
</td></tr>
</table></div>
<p>
The <code class="filename">configure</code> script or <span class="command"><strong>meson</strong></span> will check
to make sure all of the required dependencies are already installed. If you are
missing any dependencies, it will exit and display an error.
</p>
<p>
By default, <span class="application">gtkmm</span> if built with Meson or Autotools, will be installed under the
<code class="filename">/usr/local</code> directory. On some systems you may need to
install to a different location. For instance, on Red Hat Linux systems
you might use the <code class="literal">--prefix</code> option with configure, like
one of:
</p>
<pre class="screen">
# meson setup --prefix=/usr <builddir> <srcdir>
# meson configure --prefix=/usr
# ./configure --prefix=/usr
</pre>
<p>
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="icons/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top">
<p>
You should be very careful when installing to standard system prefixes
such as <code class="filename">/usr</code>. Linux distributions install software
packages to <code class="filename">/usr</code>, so installing a source package
to this prefix could corrupt or conflict with software installed using
your distribution's package-management system. Ideally, you should use
a separate prefix for all software you install from source.
</p>
</td></tr>
</table></div>
<p>
If you want to help develop <span class="application">gtkmm</span> or experiment with new features, you can
also install <span class="application">gtkmm</span> from git. Most users will never need to do this, but if
you're interested in helping with <span class="application">gtkmm</span> development, see the <a class="link" href="chapter-working-with-source.html" title="Appendix F. Working with gtkmm's Source Code">Working with gtkmm's Source Code</a> appendix.
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="chapter-installation.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<td width="20%" align="center"><a accesskey="u" href="chapter-installation.html"><img src="icons/up.png" alt="Up"></a></td>
<td width="40%" align="right"> <a accesskey="n" href="sec-packages-windows.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 2. Installation </td>
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td>
<td width="40%" align="right" valign="top"> Microsoft Windows</td>
</tr>
</table>
</div>
</body>
</html>
|