MFC-based applications can include the C++ Support Classes as a static library using the dtsfclib project.
To include the static library version of the classes in your project:
1. Tell the compiler where to find the dtSearch .lib and .h files. To do this, add the dtSearch Engine LIB folder to the library path and add the dtSearch Engine examples\cpp\include folder to the "include" path.
2. #include <dtsfclib.h> in the source code modules that use the dtSearch Engine.
Four versions of the static library are included: Release, Debug, Unicode Release, and Unicode Debug. The dtsfclib.h header will automatically select the correct version for your configuration.
To build the libraries, open the dtsfclib Visual C++ project file and build it. The projects are located under the dtSearch examples folder, in folders named examples\vcNN\dtsfclib, where N is the Visual C++ version.
To use the pre-built static libraries, your project must
1. Use MFC
2. Be built with MFC support and with the multithreaded DLL version of the runtime library;
3. Be built with the option to make wchar_t a built-in type (Project properties > C/C++ > Language > Treat wchar_t as Built-in Type);
4. Use the new streams (#include <fstream>, not #include <fstream.h>), if the project uses iostreams; and
5. #define the USE_DTSEARCH_NAMESPACE macro.
If your project is not compatible with these assumptions, you can still use the C++ Support Classes, but you will need to include them as source code.
The static libraries are built by the project in the examples\vcNN\dtsfclib folder, so you can also build custom versions of the static libraries.