TestU01 Installation Guide

Valid XHTML 1.0 Transitional

This package can be compiled under Linux or Microsoft Windows 9x/Me/2000/XP. It should also compile on any UNIX-like operating system supporting GNU tools, but it was only tested under Linux and Windows.

The TestU01 package is offered as source code or precompiled binaries. The source code version can be compiled on any platform providing the GNU tools such as UNIX/Linux, Cygwin or MinGW for Windows. The precompiled binaries are provided as a convenience for the Windows users.

For UNIX/Linux, unzip the package in the appropriate directory and follow the instructions in the README file.

The following is for MS Windows users

There is further information in the README file of the package.


To install and use TestU01, one needs the GNU C compiler. This compiler is bundled with most Linux distributions, but it must be installed separately for Microsoft Windows. Since the build system is designed for GCC, TestU01 cannot be used directly with third party compilers such as Microsoft Visual C++. To use TestU01 with another compiler than GCC, one must build the package manually for the target compiler, without using the provided build system.

To compile TestU01, a Bourne shell is needed. It is included with every Linux distribution, but it has to be installed separately under Microsoft Windows. For Microsoft Windows, two environments are supported.

Minimalist GNU for Windows provides a GCC compiler with the minimal tools only. It must be installed with the MSYS minimal system in order to get a shell into which the build system can be run.
This is a complete UNIX-like environment for Windows providing the GCC compiler, the Bourne shell and a lot of other tools.

Only one of these tools is required to use TestU01. If one has to download and install one, MinGW/MSYS is the smallest in size and will be sufficient for TestU01. However, if one already has Cygwin installed, it can be used to compile and run TestU01.

Using Windows precompiled binaries

The Windows precompiled binaries are ZIP files containing the compiled TestU01 library, with no source code. Although they avoid recompiling the library, a GCC compiler is always needed to link executables against the library. Using a Bourne or Bash shell is also recommended to compile the executables.

To install the binaries, one simply has to unzip the appropriate TestU01 binary in the root directory of the chosen environment. This will extract files in /usr/include, /usr/lib, and /usr/share/TestU01. This can be done with commands similar to the following:

       cd /
       unzip <path to download ZIP file>/bin-cygwin.zip

From the Cygwin or MSYS environment, the documentation and examples will then be accessible from /usr/share/testu01. Some people found it necessary to put the package in a Cygwin subdirectory. For example in c:\cygwin\usr.

Manual installation

To manually compile and install the library, one simply has to use the standard GNU build process. In the Bash shell, from the directory where the TestU01 source code distribution was unzipped, one writes

make install
or perhaps
./configure --prefix=<install directory>
make install

Under MSYS or Cygwin, it is necessary to add the --disable-shared option to ./configure and it is also recommended to add the --prefix=/usr. The compilation should not be performed from the MS-DOS prompt; one should use the MSYS or Cygwin shell.

For more detailed instructions for the installation, read the README file in the TESTU01 distribution.

Compiling programs

In order to compile the programs, the 3 following paths must be added to the environment variables:

   LD_LIBRARY_PATH    <install directory>/lib
   LIBRARY_PATH       <install directory>/lib
   C_INCLUDE_PATH     <install directory>/include

In a C-shell, they can be added or set with

   setenv LD_LIBRARY_PATH <install directory>/lib:${LD_LIBRARY_PATH}
   setenv LIBRARY_PATH <install directory>/lib:${LIBRARY_PATH}
   setenv C_INCLUDE_PATH <install directory>/include:${C_INCLUDE_PATH}

In a Bourne shell, they can be added or set with

   export LD_LIBRARY_PATH=<install directory>/lib:${LD_LIBRARY_PATH}
   export LIBRARY_PATH=<install directory>/lib:${LIBRARY_PATH}
   export C_INCLUDE_PATH=<install directory>/include:${C_INCLUDE_PATH}

To compile a program called birth1.c for example, one may use

   gcc birth1.c -o birth1 -ltestu01 -lprobdist -lmylib -lm
   gcc birth1.c -o birth1 -ltestu01 -lprobdist -lmylib -lgmp -lm
if your system has the external library GMP).

The Windows user with MinGW may have to compile with

   gcc birth1.c -o birth1.exe -ltestu01 -lprobdist -lmylib -lwsock32
   gcc birth1.c -o birth1.exe -ltestu01 -lprobdist -lmylib -lgmp -lwsock32 
if your system has GMP).

Running programs

Before running a program, the Windows user with Cygwin may have to set the PATH
   export PATH=<install directory>/bin:${PATH}