mnoGoSearch 3.3.7 reference manual: Full-featured search engine software
Prev | Chapter 9. Miscellaneous | Next

# Using `libmnogosearch` library

Starting from version 3.0.7, `libmnogosearch` is available for use in your own applications. You can easily embed search features into your own application using the library and the include files installed in /lib and /include mnoGoSearch's directories. Every source file that uses `libmnogosearch` function calls should include `udmsearch.h` header file.

## `udm-config` script

When compiled with one of the supported SQL back-end, `libmnogosearch` requires some dependent libraries, for example `libmysqlclient`. You can find the `udm-config` script in the `/bin` directory of mnoGoSearch's installation. This script helps taking required dependencies into account. The `udm-config` script can take several options in its command line. By default `udm-config` outputs all available options:

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

When executed with `--libs` command line option, `udm-config` outputs everything needed to `libmnogosearch` linker flags, for example:

    # ./udm-config --libs
    -lm -L/usr/local/mysql/lib/mysql -lmysqlclient \
    -L/usr/local/mnogosearch/lib -lmnogosearch

So you can insert `udm-config` `--libs` into the CC compiler command line:

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

## mnoGoSearch API

A detailed description of the mnoGoSearch C API is given in Reference II, mnoGoSearch C API function reference. You can also use `search.c` for additional examples of `libmnogosearch` functions calls.

Prev | Home | Next
Miscellaneous | Up | MySQL fulltext parser plugin