Show: Delphi C++
Display Preferences

Boost Libraries

From RAD Studio XE3
Jump to: navigation, search

Go Up to C++ Reference


Contents

The Boost libraries are a set of C++ libraries that significantly expand the language using template metaprogramming. Subsets of Boost Version 1.39 and Version 1.50.0 are included that have been fully tested and preconfigured specifically for C++Builder XE3.

  • Binaries have been built for functions that require them.
  • Include paths have been set for the Boost libraries, and any necessary libraries should be automatically linked because of #pragma link lines in the Boost code.

Installing and Uninstalling the Boost Libraries

Note about 64-bit Windows: For a 64-bit Windows C++Builder installation, you need at least 3 Gigabytes of free disk space in order to ensure that the Boost Libraries are correctly installed, and the product installation might require 18 Gigabytes of disk space.
  • For a 64-bit Windows install, you get both Boost 1.50.0 (for 64-bit Windows applications) and Boost 1.39 (for 32-bit Windows applications).
  • For Boost Version 1.39, separate libraries are installed for 32-bit Windows and for OS X.

The RAD Studio product installer gives you a choice of whether to install the Boost Libraries. Boost is one of the items listed in the feature selections tree of the product installer. If you leave Boost enabled, the separate Boost installer is started by the product installer, and installs the Boost libraries.

To uninstall only the Boost libraries (not the entire product), you should run the Boost installer and choose the Remove option, as described in the following steps.

To uninstall only the Boost libraries (not the product):

  1. Open the Windows Control Panel.
  2. Choose Uninstall a program.
  3. Double-click Boost Libraries for C++Builder <version>. The Boost installer starts.
  4. On the Welcome page of the Boost installer, choose the Remove option and click Next.
  5. On the Ready to Uninstall page, click Next.

Boost Libraries Installation Locations

The following table shows the Boost Libraries Versions that are used on specific target platforms and installed on specific development systems with RAD Studio:

Boost Version Target Platform Development System

Boost version 1.39

  • 32-bit Windows target platform
  • Mac OS X target platform
  • 32-bit Windows development systems
  • 64-bit Windows development systems

Boost version 1.50.0

  • 64-bit Windows target platform
  • 64-bit Windows development systems

Boost Version 1.39

Include Directories

For Boost Version 1.39, the typical include directory is as follows:

  • (32-bit development system:
 C:\Program Files\Embarcadero\RAD Studio\<n.n>\include\boost_1_39\boost   
  • 64-bit development system:
 C:\Program Files (x86)\RAD Studio\<n.n>\include\boost_1_39\boost

Run-Time Libraries

For the 32-bit Windows target platform, the Boost Version 1.39 libraries are typically installed here:

 C:\Program Files\Embarcadero\RAD Studio\<n.n>\lib\Win32\release

For the Mac OS X target platform, the Boost Version 1.39 libraries are installed in the following directory:

 C:\Program Files (x86)\Embarcadero\RAD Studio\<n.n>\lib\osx32\release

For the 64-bit Windows target platform, the Boost Version 1.39 libraries are installed here:

 C:\Program Files (x86)\Embarcadero\RAD Studio\<n.n>\lib\Win32\release

Example File Names

For Boost Version 1.39 on Windows, the files themselves are too numerous to list, but these are the names of the Boost libraries for the Mac OS X target platform:

libboost_date_time-bcb-mt-1_39.a
libboost_math_c99-bcb-mt-1_39.a
libboost_math_c99f-bcb-mt-1_39.a
libboost_regex-bcb-mt-1_39.a
libboost_signals-bcb-mt-1_39.a
libboost_system-bcb-mt-1_39.a

Libraries for the Win32 target platform have the file extension .lib.

Boost Version 1.50.0

Boost Version 1.50.0 is used only for the 64-bit Windows target platform.

Include Directory

For Boost Version 1.50.0, the typical include directory is:

C:\Program Files (x86)\Embarcadero\RAD Studio\<n.n>\include\boost_1_50\boost

Run-Time Libraries

For the 64-bit target platform, the Boost Version 1.50.0 files are typically installed here:

C:\Program Files (x86)\Embarcadero\RAD Studio\<n.n>\lib\win64\release

Example File Names

The files themselves for Version 1.50.0 are too numerous to list, but these are examples:

libboost_chrono-bcb-1_50.a
libboost_date_time-bcb-1_50.a
libboost_math_c99-bcb-1_50.a
libboost_prg_exec_monitor-bcb-1_50.a
libboost_random-bcb-1_50.a
libboost_unit_test_framework-bcb-1.50.a

Including the Boost Libraries for Windows

A C++ application uses the correct version of Boost to match the target platform for an application. For example, if your application has a 64-bit Windows target platform, Boost version 1.50.0 is used. If you set a 32-bit Windows target platform, Boost version 1.39 is used. (The term target platform means the current setting of the Target Platforms node in the Project Manager.)

In a Boost 1.39 installation, the Boost minmax extensions are installed in the algorithm directory. For example, to use minmax in an application that targets 32-bit Windows, your code should specify:

#include <boost/algorithm/minmax.hpp>

This command includes the minmax library that is part of the algorithm directory. The Boost 1.50.0 directory structure might be different.

The path to the Boost libraries is specified in the following environment variables:

  • CG_BOOST_ROOT for 32-bit Windows systems
  • CG_64_BOOST_ROOT for 64-bit Windows systems

These variables are set on the Tools > Options > Environment Options > Environment Variables dialog box.

Including the Boost Libraries for Mac OS X Applications

For Mac OS X application development, you can use the Boost libraries for OS X, which are installed by default in the program files on the development computer at:

 Embarcadero\RAD Studio\<n.n>\lib\osx32\release\  

With the OS X target platform, .a files are library files. For example, the $(BIN)\llib\osx32\release directory contains .a files such as date time, math_C99/math_c99f, regex, signals, and system. For exact information about the OS X Boost headers available to you, please explore the directories subordinate to your Boost installation directory $(BIN)\lib\osx32\release.

Using the same #include command shown in the example above (for Windows) also includes the Boost Libraries for Mac OS X in your project.

Boost Documentation

To view the help for the Boost libraries, go to:

See Also

Personal tools
Previous Versions
In other languages