Installation



Installation guides are provided for the following platforms:


Linux Instructions

These instructions should work on most Linux distributions.


0. 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


1. 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 boost library. Verify that boost is installed, and that it's possible to link to -lboost_system-mt.

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.


2. 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 7.


0. Requirements

The following should be installed before Dasyne is compiled:


1. Set Environment Variables

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

MINGDIR (create)

PATH (modify)


2. Add Boost to MinGW

These instructions are for boost 1.49, but should work on later versions.

Boost Header files

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

Boost Library Files

Dasyne requires boost's multi-threaded system library. By default, Boost gives the library a different name depending on your compiler and the version of boost. On my system, I found:

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


3. Add Zlib to MinGW

Once you have built Zlib:


4. Compiling


4a. Compiling Examples

For example, on my machine the boost system library is named libboost_system-mgw46-mt-1_49.dll, so I would use:
mingw32-make BOOSTSYS=boost_system-mgw46-mt-1_49


5. 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 boost_system-mgw46-mt-1_49


Using Dasyne

To use Dasyne, include Dasyne.hpp:

#include "Dasyne.hpp"

Windows users 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