ExRandom  2.1
Compiling all the examples
Back to Getting started. Forward to Code organization. Up to Contents.

If you're familiar with cmake, then use this to compile the example programs. On Linux and MacOSX, the commands are, for example,

mkdir BUILD
cd BUILD
cmake ..
make
make test
examples/simple_normal
etc.

For Windows they might be

mkdir BUILD
cd BUILD
cmake -G "Visual Studio 11 Win64" ..
cmake --build . --config Release
cmake --build . --config Release --target RUN_TESTS
examples\Release\simple_normal
etc.

cmake will attempt to find Boost and MPFR for compiling the programs in the multiprec directory (see Multi-precision floating-point types). If necessary, define the MPFR_DIR path to point to where MPFR is installed. Other make targets which might be helpful are

If you install ExRandom, you can include it in another cmake project by

find_package (ExRandom REQUIRED)
include_directories (${ExRandom_INCLUDE_DIRS})

Simple makefiles are provided to compile the programs in the examples directory. For Linux and MacOSX, use

cd examples
make
./simple_normal
etc.

On Windows, start, e.g., a "Visual Studio 11 command prompt", and type

cd examples
nmake /f makefile.vc
.\simple_normal
etc.
Back to Getting started. Forward to Code organization. Up to Contents.