Build and configure libsmart using the Microsoft C++ IDE

To build libsmart with the Microsoft IDE installed, you just have to load the libsmart.vcproj file into our IDE. Select the desired build settings. More information can be found at libsmart root/Readme.

Build settings

debug “/MTd” (debug, multithread, static runtime routines)

Defines _DEBUG and _MT. Defining _MT causes multithread-specific versions of the run-time routines to be selected from the standard .h files.

output: lib/libsmart-debug.lib, intermediate directory: msvc/debug

debug DLL “/MDd” (debug, multithread, DLL runtime routines)

Defines _DEBUG, _MT, and _DLL so that debug multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files.

output: lib/libsmart-crtdll-debug.lib, intermediate directory: msvc/debug

release “/MT” (release, multithread, static runtime routines)

Defines _MT so that multithread-specific versions of the run-time routines are selected from the standard header (.h) files.

output: lib/libsmart.lib, intermediate directory: msvc/release

release DLL “/MD” (release, multithread, DLL runtime routines)

Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files.

output: lib/libsmart-crtdll.lib, intermediate directory: msvc/release_dll

Single threaded run-time routines will not be supported!

Expat support (XML parser)

If you want to build libsmart or “your application linking libsmart” with expat support, you have to:

Install Expat

You can obtain expat via http://sourceforge.net/projects/expat/.

Building libsmart

a.) Set the following preprocessor definitions e.g. (IDE: Configuration Properties – C/C++ – Preprocessor Definitions):

HAVE_LIBEXPAT, XML_DTD

b.) Add expat.h include directory to project include path.

c.) Optional: If you want to use expat as a static library add preprocessor definition XML_STATIC. (Using expat as a DLL requires no definitions.)

Build your application

a.) You need to link against the Libs/StaticLibs from the expat distribution directory: To do this, add the Libs/StaticLibs directory to the LIB path and link with libexpat.lib/libexpatMT.lib.

b.) You must set preprocessor definition HAVE_LIBEXPAT for your application.