ClanLib does not provide Linux binaries, and if your distribution does, they may well be out of date. The recommended way to install ClanLib on Linux is hence to compile it from source, as follows.
ClanLib requires a C++ compiler and a number of other libraries; how to install these depends on which Linux distribution you are using. The following command downloads and installs everything required to allow use of all parts of ClanLib.
Some 3D examples require assimp. See the AssimpLinux page.
Download the latest ClanLib source archive.
Open a terminal prompt and change to the directory you extracted ClanLib to.
(If you get: "configure.ac:178: error: possibly undefined macro: AC_MSG_CHECKING", you will need to install the pkg-config package")
Configure (this gives the standard one, see below for other options):
To get a list of available options, run "./configure --help"
Developers may prefer to add --enable-debug to create debug libraries.
You can force enabling of implementations, or disable some - eg.:
By default both shared (.so) and static (.a) libraries are built. Unless you want to make a static release, you will probably only want the shared libraries, so can disable the static ones with:
Doing so will reduce the compile size by a half.
Compile (this will take some long time):
ClanLib should now be ready for use.
Note: On CentOS, you must run this command to be able to compile with ClanLib:
ClanLib includes API reference documentation within its source files, which can be extracted to HTML using:
It will then be found at file:///your ClanLib directory/Documentation/Reference/doxyoutput/html/modules.html
ClanLib also includes a number of examples, which are compiled and run as follows (replace Display/Basic2D with the example category and name):
On Fedora linux and CentOS, if you get "Package clanApp-4.0 was not found in the pkg-config search path", this command helps fix the problem
These examples compile and link a source file named mygame.cpp with the ClanLib 4.0.x modules required for graphics (2D or 3D, using OpenGL 2+) and input. If you use other parts of ClanLib such as networking (clanNetwork), sound (clanSound) or GUI (clanUI), amend them accordingly.