RandomLib  1.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Installing RandomLib
Back to Introduction. Forward to Getting started. Up to Contents.

RandomLib has been developed under Linux with the g++ compiler (versions 4.0 and later) and under Windows with MS Visual Studio 2005, 2008, and 10 (2010), 11 (2012), and 12 (2013). Earlier versions were tested also under Darwin and Solaris. It should compile on a wide range of other systems. First download either RandomLib-1.10.tar.gz or RandomLib-1.10.zip. Then pick one of the first three options below:

The first installation method uses two important techniques which make software maintenance simpler

Installation with cmake

This is the recommended method of installation, however it requires that cmake be installed on your system. This permits RandomLib to be built either as a shared or a static library on a wide variety of systems. cmake can also determine the capabilities of your system and adjust the compilation of the libraries and examples appropriately.

cmake is available for most computer platforms. On Linux systems cmake will typically one of the standard packages and can be installed by a command like

  yum install cmake 

(executed as root). On other systems, download a binary installer from http://www.cmake.org click on download, and save and run the appropriate installer. Run the cmake command with no arguments to get help. Other useful tools are ccmake and cmake-gui which offer curses and graphical interfaces to cmake. Building under cmake depends on whether it is targeting an IDE (interactive development environment) or generating Unix-style makefiles. The instructions below have been tested with makefiles and g++ on Linux and with the Visual Studio IDE on Windows.

Here are the steps to compile and install RandomLib:

Installation with GNU compiler and Make

This method requires the standard GNU suite of tools, in particular make and g++. This builds a static library and the examples.

Here are the steps to compile and install RandomLib:

Installation on Windows

This method requires Visual Studio 2008 (or 2005). This builds a static library and the examples. If you only have Visual Studio 2010, use cmake to create the necessary solution file. RandomLib does not compile correctly with Visual Studio 2003.

Maintainer tasks

Check the code out of git with

  git clone -b master git://git.code.sf.net/p/randomlib/code randomlib

Here the "master" branch is checked out. There are three branches in the git repository:

In order to build a source distribution, configure with cmake and then run

  make dist 

which will package the source tree for distribution as

  RandomLib-1.10.tar.gz
  RandomLib-1.10.zip 

Finally,

  make package 

or building PACKAGE in Visual Studio will create a binary installer for RandomLib. For Windows, this requires in the installation of NSIS. On Windows, you should configure RandomLib with PACKAGE_DEBUG_LIBS=ON, build both Release and Debug versions of the library and finally build PACKAGE in Release mode. This will get the release and debug versions of the library included in the package. (This has not been tested to any extent. Presumably people using RandomLib will be able to build it from the source.)

The script tests/test-distribution checks out the source from git, verifies that it builds correctly and prepares the release packages.

Back to Introduction. Forward to Getting started. Up to Contents.