Building and installing insd

Requirements

You will need a C++ compiler recent enough to support the C++11 standard (formerly known as C++0x).

This library should work with most Linux distributions. (Other flavours of Unix may implement system calls differently in which case the insd source code would need to be modified accordingly.

Insd is a static library. If you distribute your finished application in binary form, insd is integrated into your binary and does not need to be installed on the end-user's system explicitly.

Building and installing insd

First, build insd as follows:
    $ make

Note: To enable compiling to the new C++11 standard, the GCC compiler requires the -std=c++0x command-line argument. If your compiler uses a different convention, simply edit the Makefile to change the compiler command accordingly. Insd will not build without C++11 support.


Then, as superuser, install insd as follows:

    # make install

Note: The Makefile assumes that your system's default lib directory is /usr/lib/ and your system's default include directory is /usr/include/.

Some Unix flavours and Linux distributions instead place these files in /usr/local/lib/ and /usr/local/include/ respectively. If your system is like this, simply change the paths in the Makefile prior to running make install.


Getting by without installing

If you don't have superuser privilidges, or simply want to use insd without installing it, you can get by with just copying the insd source code into the source tree of whatever project you happen to be working on. The only differences are in how you include the header (#include "insd/src/insd.hh" as opposed to #include <insd.hh>, and that you will need to compile the insd/src/*.cc source files and link them with your project explicitly. If you're not sure what compiler arguments to use, look in the insd Makefile for clues.

There is no practical difference between a binary application produced using either approach.