Game Theory Tools - tutorial  v0.6.0
Tools for calculating Nash equilibria
 All Files Pages
Building project

Requirements

To build the project it is recommnded to use some POSIX or POSIX like environment - it guaratees that both project's own builder and possible dependancies builders will work correctly.

Currently it is required to have installed:

Linux systems

On majority of Linux distributions those tools can be obtained by their respective pagage mangers. For instance Debian's APT can download the with following command:

sudo apt-get install g++ bison flex libgmp-dev libboost-all-dev scons

On distrubutions where either package managers are not available or some library is not obtainable that way it still possible to build it with instructions attatched to the respective project.

Windows systems

On Windows it is recommended to build project using Cygwin environment or similar.

Following packages should be installed among its dependencies:

Boost libraries need to be build manually separately since version provided with Cygwin doesn't contain e.g. Boost Unit Test Framework. After downloading and extracting source to directory of choice call commands under Cygwin terminal:

cd [boost directory]
./bootstrap.sh
./b2 install --prefix=[cygwin directory] # for x86 (32-bit)
./b2 install --prefix=[cygwin directory] architecture=x86 address-model=64 # for x86_64 (64-bit)

making sure that choosen architecture matches Cygwin's one. Alternatively you might try any other tutorial explaining how to install Boost on Windows and make it visible to Cygwin environment.

If you want to use Clang instead of GCC keep in mind that at least version 1.48 of boost generates errors in Clang that are not displayed by GCC. To avoid it use Clang version that fully supports C++11 and Boost version with this issue fixed e.g. Clang 3.3 and Boost 1.54:

...
/usr/include/boost/container/allocator/allocator_traits.hpp:167:54: error: missing 'typename' prior to dependent type name 'boost::intrusive::detail::type_rebinder<Alloc, T>::type'
template <typename T> using rebind_alloc = boost::intrusive::detail::type_rebinder<Alloc, T>::type;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is caused by lack of typename word that was fixed somwhere between 1.49 and 1.50.0-beta1 (see https://github.com/boostorg/container/commit/7f1456c30fa5ed58af912d67352f55bc961be55e ). GCC didn't treated it as error (mistakingly?) and so it ended up in a released version.

Building project

Once all dependencies are available project can be build with scons script. Navigate to the project directory with terminal and call chosen command to build respective target:

Usually you'd want to build either execuitables or libraries depending on wheter you want to run GTL parser or use library in a C++ program.

To build project using Clang define environment variables CXX and CC:

CXX=clang++ CC=clang scons # for 1 line only
export CXX=clang++ CC=clang
scons # for whole shell

To build project with statically linked libraries use static=1 argument e.g.:

scons -Q buildExecutables static=1

To build project in debug mode use debug=1 argument e.g.:

scons -Q buildExecutables debug=1

By default it is turend off (release mode).

To build project with optimized binaries use optimize=1 argument e.g.:

scons -Q buildExecutables optimize=1

It's by default turned on on release and turned off on debug mode.