Installation guides are provided for the following platforms:
These instructions should work on most Linux distributions.
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
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.
Link your program to the dasyne, boost and zlib libraries:
g++ MyProgram.cpp -ldasyne -lz -lboost_system-mt
These instructions were tested on Windows 8.1.
Install MinGW gcc 4.4 or later. If the installer asks which thread model to use, pick win32.
As of Windows 8.1, environment variables can be added or set by doing the following:
MINGDIR (create)
PATH (modify)
These instructions were tested with boost 1.58, but should work on later versions.
Compile BoostDasyne 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 filesCopy the "boost" directory from boost's base directory into MinGW's "include" directory.
Boost Library FilesBy 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.
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
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
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;