Close
dtSearch Text Retrieval Engine Programmer's Reference
Using the dtSearch Engine with C++ (Linux)

How to add the dtSearch Engine to a C++ project under Linux

The dtSearch Engine is a 32-bit or 64-bit dynamic library with an exported function-call interface. 

The dynamic library is named libdtsearch.so (32-bit) or libdtsearch64.so (64-bit). These files are in the dtsearch\bin and dtsearch\bin64 folder after installing dtSearch. 

To add the dtSearch Engine to a C++ project, 

1. Link with the dtSearch library (-ldtsearch or -ldtsearch64) 

2. Add dtsearch.cpp and dtsviewr.cpp to the C++ source for the project. These modules define constructors and other functions for interface structures used in the dtSearch Engine API. 

3. #include <dtsearch.h> in files that call the dtSearch Engine. 

The C++ function-call interface consists of a series of API functions with names that begin "dtss" (such as dtssDoSearchJob) and structures used with those API functions, with names that begin "dts" (such as dtsSearchJob). 

Single-byte string values in the API are always encoded as UTF-8, so Unicode is supported. 

In addition to the basic C/C++ function-call interface, the dtSearch Engine includes a small class library to make the interface easier to work with. See C++ Support Classes for more information. This class library is not built into the dtSearch Engine DLL. Instead, it is provided in source code form as a set of C++ files you can include in your project. 

For a small sample C++ application that you can use as a starting point, see the dtsearch\examples\gcc\textdemo folder.