9.2. Using libdpsearch library

The libdpsearch is available for using it in third party applications. You can easily add search into your own application using library and include files installed in /lib and /include DataparkSearch directories. Each application which uses libdpsearch must have dpsearch.h header file included.

9.2.1. dps-config script

When compiled with one of supported SQL back-end, libdpsearch requires some dependent libraries, for example libmysqlclient. You can find dps-config script in /bin directory of DataparkSearch installation. This script helps to take in account required dependencies. dps-config script can take several options in it's command line. By default dps-config outputs all available options:

Usage: ./dps-config [OPTIONS]
Options:
        [--version]
        [--libs]
        [--cflags]

When executed with --libs command line option dps-config outputs all required to libdpsearch linker flags, for example:

# ./dps-config --libs
-lm -L/usr/local/mysql/lib/mysql -lmysqlclient \
-L/usr/local/dpsearch/lib -ldpsearch

So you may insert dps-config --libs into CC compiler command line:

cc myprog.c -o myprog `dps-config --libs`

9.2.2. DataparkSearch API

There is no detailed description of DataparkSearch API yet. This is because API is currently under rapid development and may have major changes from version to version. You may use search.c as an example of application which uses libdpsearch library.



Geo Visitors Map who's online