libShiva depends on the following packages:
Make sure you have these libraries installed. Then unarchive the shiva package:
$ tar -xzf libShiva-0.1.1.tar.gz
Browse into libShiva folder:
$ cd libShiva-0.1.1
And invoke standard automake installation commands:
$ ./configure
$ make
$ sudo make install
In order to use libShiva API, you should add the following #include statements at the beginning of your C++ file:
#include <OpenCC/OpenCC.h> #include <Shiva/Shiva.h>
Additionally, if you do not like adding Shiva:: namespace name in front of every libShiva class name, use the following namespace directive:
using namespace Shiva;
Along with libShiva a shiva-config script will be installed which outputs the compile flags and libraries that your program must link to when using libShiva.
To compile your program, simply run g++ with your input files and the shiva-config output passed:
$ g++ -o shivatest shivatest.cpp `shiva-config --cflags --libs`