Installation



Installation guides are provided for the following platforms:


Linux Instructions

These instructions should work on most Linux distributions.


1. Requirements

The following should be installed before Dasyne is compiled:

If you're installing from a repository (using a package manager), be sure to install the development version of the packages. Under Ubuntu, the following packages should suffice: libboost-all-dev build-essential zlib1g-dev


2. Compiling

Compiling is as simple as:

If configure gives an error like: "C++ compiler cannot create executables", it's most likely that configure couldn't find the zlib library. Verify that the zlib development files are installed, and that it's possible to link to -lz.

If you would like to install somewhere other than the default location, you can pass --prefix=/my_location to the configure script. The last step, make install, should be performed as root.


3. Linking

Link your program to the dasyne, boost and zlib libraries:

g++ MyProgram.cpp -ldasyne -lz -lboost_system-mt


Windows MinGW Instructions

These instructions were tested on Windows 8.1.


1. Install MinGW

Install MinGW gcc 4.4 or later. If the installer asks which thread model to use, pick win32.


2. Set Environment Variables

As of Windows 8.1, environment variables can be added or set by doing the following:

MINGDIR (create)

PATH (modify)


3. Add Boost to MinGW

These instructions were tested with boost 1.58, but should work on later versions.

Compile Boost

Dasyne requires Boost's multi-threaded system library, which means that Boost needs to be compiled. As of Boost 1.58, we need to use Boost.Build with the gcc toolset - when you call Boost's bootstrap.bat, you should use bootstrap gcc. See the Boost 'Getting Started Guide' for more information.

Boost Header files

Copy the "boost" directory from boost's base directory into MinGW's "include" directory.

Boost Library Files

By default, Boost gives the system library a different name depending on your compiler and the version of boost. On my system, I found:

Copy both files to MinGW's "lib" and "bin" folders.


4. Add Zlib to MinGW


5. Compile Dasyne


6. Install Dasyne


7. Compile Examples

For example, on my machine the boost system library is named libboost_system-mgw51-mt-1_58.dll, so I would use:

mingw32-make BOOSTSYS=libboost_system-mgw51-mt-1_58


8. Linking

Link your program to the dasyne, boost, windows and zlib libraries:

-ldasyne -lz -lboost_lib -lws2_32 -lmswsock

The value of boost_lib will vary from system to system; on my system it's libboost_system-mgw51-mt-1_58


Using Dasyne

To use Dasyne, include Dasyne.hpp:

#include "Dasyne.hpp"

Windows programs should #define DA_WINDOWS_VERSION before including Dasyne.hpp.

All classes, enumerations and constants belong to the libdasyne namespace. They can be accessed either by adding the namespace:

using namespace libdasyne;

or by specifying the scope:

libdasyne::DBuffer myBuffer;











Back to contents