Introduction: c++-gtk-utils library

The sha256sum of c++-gtk-utils-1.2.37.tar.gz is 5949e4851612f75557d3f37a9f5105cd020f8850667f0093cab2680480dea914

The sha256sum of c++-gtk-utils-2.0.25.tar.gz is fa64979faf13cd21b058d49726fff89d8d334848d8cb1de0798d055f2b78e6b6

The sha256sum of c++-gtk-utils-2.2.8.tar.gz is e33f58b030591aede18632373c4c05a313cada57b448f182c457725ca80fad83


NOTE: './configure' will prepare the library for compilation against GTK+3. To compile the library against GTK+2, use './configure-gtk2'.

c++-gtk-utils is a lightweight library containing a number of classes and functions for programming GTK+ programs using C++ in POSIX (unix-like) environments, where the user does not want to use a full-on wrapper such as gtkmm or wxWidgets, or is concerned about exception safety or thread safety of the wrapper and their documentation. It is parallel installable for both GTK+2 and GTK+3. There is also an option to install a subset of the library with only glib/gobject/gio support, without GTK+.

There are three currently maintained stable series of the library, namely the 1.2, 2.0 and the 2.2 series. The latest release in the 1.2 series is c++-gtk-utils-1.2.37. The 1.2 series of the library can be compiled with any C++98/03 compliant compiler such as gcc, and can also be compiled under C++0x/11/14.

The 2.0 and 2.2 series target C++0x/11/14 only, the latest releases of which are c++-gtk-utils-2.0.25 and c++-gtk-utils-2.2.8 respectively. If using gcc with the 2.2 series, gcc-4.6 or later is required, and with clang, clang-3.2 or later. The 2.0 series will compile with gcc-4.4 or later.

If in doubt, go for the 2.2 series if using C++0x/11/14, and the 1.2 series if using C++98/03. The 2.2 series is nicer to use than the 2.0 series: the 2.0 series is for transitional purposes for compilers which do not adequately support C++11. In particular, the 2.2 series provides a more generalised interface for callable objects than does the 2.0 series.

The 2.2 series makes an ABI break for bug-fix purposes, providing c++-gtk-utils-2-2.2.pc and c++-gtk-utils-3-2.2.pc pkg-config configuration files (the 2.0 series provides c++-gtk-utils-2-2.0.pc and c++-gtk-utils-3-2.0.pc). However, code written for the 2.0 series will normally compile against the 2.2 series without change - the only significant issue is that the --with-auto-ptr configuration option has been removed in the 2.2 series, so if that option has not been used then when switching from the 2.0 to 2.2 series, code should recompile without change.

Every release in the 1.2, 2.0 and 2.2 series is ABI compatible with earlier releases in the same series. None of the 1.2, 2.0 or 2.2 series is ABI compatible with a different series, but they are parallel installable. This means that at any one time it is possible to have 6 parallel installations of c++-gtk-utils: the 1.2 series for GTK+2, the 1.2 series for GTK+3, the 2.0 series for GTK+2, the 2.0 series for GTK+3, the 2.2 series for GTK+2, and the 2.2 series for GTK+3.

Code using the 2.0 and 2.2 series should be compiled with the -std=c++0x, -std=c++11, -std=c++1y or -std=c++14 compiler flag. gcc-4.7.1 onwards accepts either the -std=c++0x or -std=c++11 flag, as does clang-3.2 (prior to gcc-4.7.1 only the -std=c++0x flag was accepted). gcc-4.8.0 onwards accepts the -std=c++1y flag (but little of c++1y/14 was implemented before gcc-4.9).

It is intended that the main features offered by the 1.2, 2.0 and 2.2 series will remain in step, and that the 1.2 series will be maintained for as long as C++98/03-only programs are likely to be written (namely, some years). However, some features can only conveniently be provided using C++11.