Urdl C++ Library

PrevUpHomeNext

Building and using Urdl

There are three options for using Urdl in an application:

Using Urdl as a separately compiled library

Urdl uses bjam and Boost.Build to build shared and static libraries. To build the libraries, perform the following steps:

  1. Set a BOOST_ROOT environment variable pointing to the location of Boost.
  2. If building on Windows, set an OPENSSL_ROOT environment variable pointing to the location of OpenSSL. When building on UNIX, the build scripts assume that the OpenSSL headers and libraries may be found in the system's include and library paths, respectively. To disable Urdl's SSL support, define URDL_DISABLE_SSL=1 as an environment variable.
  3. Run bjam in the top-level directory of the Urdl distribution. Libraries should be built into the lib subdirectory.

Then, to use Urdl in an application:

  1. Add the include subdirectory to your compiler's include path.
  2. Add the lib subdirectory to your linker's library path.
  3. Add the Boost directory to your compiler's include path.
  4. Add the Boost library directory (e.g. stage/lib) to your linker's library path. Urdl needs the application to link against the Boost.System and Boost.Date_Time libraries.
  5. If disabling Urdl's SSL support, add URDL_DISABLE_SSL=1 to your compiler's preprocessor definitions.
  6. If using the DLL version of Urdl on Windows, add URDL_DYN_LINK=1 to your compiler's preprocessor definitions.
Compiling Urdl directly into an application

To compile Urdl directly into an application, perform the following steps:

  1. Add the include subdirectory to your compiler's include path.
  2. Add the file src/urdl.cpp to your project or makefile.
  3. Add the Boost directory to your compiler's include path.
  4. Add the Boost library directory (e.g. stage/lib) to your linker's library path. Urdl needs the application to link against the Boost.System and Boost.Date_Time libraries.
  5. If disabling Urdl's SSL support, add URDL_DISABLE_SSL=1 to your compiler's preprocessor definitions.
  6. If building on Windows, add URDL_NO_LIB=1 to your compiler's preprocessor definitions to disable autolinking.
Using Urdl as a header-only library

To use Urdl as a header-only library, perform the following steps:

  1. Add the include subdirectory to your compiler's include path.
  2. Add the Boost directory to your compiler's include path.
  3. Add the Boost library directory (e.g. stage/lib) to your linker's library path. Urdl needs the application to link against the Boost.System library and possibly the Boost.Date_Time library.
  4. If disabling Urdl's SSL support, add URDL_DISABLE_SSL=1 to your compiler's preprocessor definitions.
  5. Add URDL_HEADER_ONLY=1 to your compiler's preprocessor definitions.

PrevUpHomeNext