Unix y Linux
- 2.2.1. Paquetes preconstruidos
- 2.2.2. Installing From Source
2.2.1. Paquetes preconstruidos
Recent versions of gtkmm are packaged by nearly every major Linux distribution these days. So, if you use Linux, you can probably get started with gtkmm by installing the package from the official repository for your distribution. Distributions that include gtkmm in their repositories include Debian, Ubuntu, Red Hat, Fedora, Mandriva, Suse, and many others.
The names of the gtkmm packages vary from distribution to distribution (e.g. libgtkmm2.4-dev on Debian and Ubuntu or gtkmm24-devel on Red Hat Fedora), so check with your distribution's package management program for the correct package name and install it like you would any other package.
The package names will not change when new API/ABI-compatible versions of gtkmm are released. Otherwise they would not be API/ABI-compatible. So don't be surprised, for instance, to find gtkmm 2.8 supplied by Debian's libgtkmm2.4-dev package.
2.2.2. Installing From Source
If your distribution does not provide a pre-built gtkmm package, or if you want to install a different version than the one provided by your distribution, you can also install gtkmm from source. The source code for gtkmm can be downloaded from http://www.gtkmm.org/.
After you've installed all of the dependencies, download the gtkmm source code, unpack it, and change to the newly created directory. gtkmm can be built and installed with the following sequence of commands:
# ./configure # make # make install
Remember that on a Unix or Linux operating system, you will probably need to be root to install software. The su command will allow you to enter the root password and have root status temporarily.
The configure script 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.
By default, gtkmm will be installed under the /usr/local directory. On some systems you may need to install to a different location. For instance, on Red Hat Linux systems you might use the --prefix option with configure, like so:
# ./configure --prefix=/usr
You should be very careful when installing to standard system prefixes such as /usr. Linux distributions install software packages to /usr, 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.
If you want to help develop gtkmm or experiment with new features, you can also install gtkmm from git. Most users will never need to do this, but if you're interested in helping with gtkmm development, see the Working with gtkmm's Source Code appendix.