Site icon Learn C++

What Are The Boost C++ Libraries?

C++ is a great programming language that has many useful libraries. One of the most useful libraries are packed in Boost C++ Libraries. which is a set of C++ libraries that contains 164 individual libraries (as of version 1.76) that significantly expand the C++ programming language using template metaprogramming. You can use boost libraries with the most of C++ IDE and compilers.

In this post we will explain what the Boost C++ Libraries are and how you can use them in C++,

What are the Boost C++ libraries?

Boost is a set of C++ libraries that contains 164 individual libraries (as of version 1.76) that significantly expand the C++ programming language using template metaprogramming. Boost libraries provides methods for the computational tasks and structures such as linear algebra, multithreading, image processing, regular expressions, pseudorandom number generation, and unit testing. Boost has libraries that work well with the C++ Standard Library. Boost works on almost any modern operating systems.

The first Boost was released on 1 September 1999 and now it has 1.81.0 version released in 2022. Boost C++ libraries are designed to allow Boost to be used with both free and proprietary software projects and they are licensed under the Boost Software License.

RAD Studio allows you to install a subset of Boost that has been fully tested and preconfigured specifically for C++Builder. RAD Studio supports different versions of Boost depending on the compiler that you use to build your application:

Boost C++ LibraryPlatformCompilerBoost Version
Boost Win32 Classic Toolchain
Boost Win32 Clang-enhanced Classic Toolchain
32-bit WindowsBCC32
BCC32C
1.39.0
1.70.0
Boost Win64 Toolchain64-bit WindowsBCC641.70.0

What are the Boost C++ libraries for the Win32 classic toolchain in C++ Builder?

The Boost Win32 Classic Toolchain C++ Libraries (version 1.39) are for the classic toolchain for Win32 only C++ Builder applications. If you have older classic C++ Builder 32bit applications that uses classic compiler you need this library. If you want to modernize, you can use Boost 1.70 for the modern Win32 and Win64 Clang-enhanced platforms.

What the Boost C++ libraries for the Win32 Clang-enhanced classic toolchain in C++ Builder?

The Win32 Boost C++ libraries are a set of C++ libraries that significantly expand the language using template metaprogramming. This is for the Win32 Clang-enhanced toolchain only.

What are the Boost C++ libraries for the Win64 toolchain in C++ Builder?

The Win64 Boost C++ libraries are a set of C++ libraries that significantly expand the language using template metaprogramming. This is for the Win64 platform only.

How to install the Boost C++ libraries?

To install Boost, select Tools > GetIt Package Manager, search ‘boost’ and select one of the Boost packages. Click Install to start the process.

How to use Boost C++ libraries – a Console application example

Here is a console application that uses boost::algorithm::apply_permuation(), If you installed boost library (here is 1.70 installed) more algorithms examples can be found in here “C:\Program Files (x86)\Embarcadero\Studio\22.0\include\boost_1_70\libs\algorithm\example

[crayon-66349d3a8fcdf297900875/]

How to use Boost C++ libraries – a C++ Builder VCL example

Here is a VCL example that runs boost::algorithm::apply_permuation() with a button (TButton) and a memo (TMemo),

[crayon-66349d3a8fce8138299454/]

How to use Boost C++ libraries – a C++ Builder FMX example

Here is a FMX example that runs boost::algorithm::apply_permuation() with a button (TButton) and a memo (TMemo),

[crayon-66349d3a8fceb857760789/]

Where to find more examples of how to use Boost C++ libraries?

In C++ Builder, If you installed a boost version you will find a folder there in that version (i.e. boost_1_70 folder for the version 1.70);

You can find more documents and examples about boost library online in;

and the latest version can be downloaded from https://www.boost.org/ or you can use C++ Builder compatible version via https://getitnow.embarcadero.com/?q=boost&product=rad-studio&sub=all&sortby=date&categories=-1

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.

There is a free C++ Builder Community Edition for students, beginners, and startups; it can be downloaded from here. For professional developers, there are Professional, Architect, or Enterprise versions of C++ Builder and there is a trial version you can download from here.

Exit mobile version