Configuring Code::Blocks to use the Boost Libraries in Windows and Linux

TweetSome examples of how to configure Code::Blocks to use the Boost C++ libraries: 1. Header-only (Windows) 2. Compiled libraries (Windows) 3. Compiled libraries (Ubuntu Linux) 1. Header-only (Windows) To configure Code::Blocks to use a header-only Boost library: Boost.DateTime. Select File > New > Project > Empty Project:

Using a subset of the boost libraries in Windows

TweetFor many C++ applications I very much want to use the Boost libraries, just not the whole set. This post explains how to use the bcp tool to create a subset of the Boost libraries in order to leave out unnecessary libraries and tailor it to the needs of your project. One nice thing about …

Continue reading ‘Using a subset of the boost libraries in Windows’ »

Using boost::filesystem

TweetExamples of using boost::filesystem for various things as and when I encounter them… Many have been lifted from the StackOverflow site. For reasons of brevity and clarity I generally avoid extraneous code such as exception handling etc in these examples and just focus on the techniques themselves. 1. Copying a directory This recursively uses boost::filesystem::create_directory …

Continue reading ‘Using boost::filesystem’ »

How to use the Boost compiled libraries in Windows

TweetAs stated on the Getting Started for Windows page, most Boost libraries are header-based that require no separate compilation. But there exist some Boost libraries that require a separate compilation in order to use them. This page essentially reiterates what is already explained in section 5.2.1 of the Getting Started page, but with additional …

Continue reading ‘How to use the Boost compiled libraries in Windows’ »

Using Boost regular expressions as word finders

TweetA sample demonstration of using the Boost libraries as a means of finding matching words in a large array table, that match the given lookup criteria. Suppose you are wrestling with a cryptic crossword and want to find all seven-letter words whose third letter is ‘Y’ and fifth letter is ‘N’, or better still, run …

Continue reading ‘Using Boost regular expressions as word finders’ »

Using BoostPro to install Boost library packages

TweetUPDATE 15 February 2014: BoostPro is no more. You may find this alternative post useful in setting up the Boost libraries that require separate compilation. A number of Windows-based Boost libraries are not “header-only” and require that you must get them compiled. One way is to compile them yourself. A possibly easier way is to …

Continue reading ‘Using BoostPro to install Boost library packages’ »