Subset of Boost (https://www.boost.org) to compile boost.asio files
This directory contains the subset of boost required to compile programs using Boost.Asio without downloading the whole Boost.
- Download
boostfrom its website into a directory called originalboostdirectory afterwards. - In
boostdirectory under the current directory containing thisREADME.mdfile (calledboostsubset directory hereafter), copyasiodirectory from originalboostdirectory. - In
/tmpdirectory, create aCPPprogram which contains#include <boost/asio.hpp> - Compile this program. If there are compilation errors because of missing
include files, copy missing files/directory form originalboostdirectory toboostsubset directory. - Proceed until there are no more compilation errors.
- Afterwards try to compile your
CPPprogram on other targeted platforms (e.g. Windows, macOS) to check that yourboostsubset directory is indeed complete.
- Download new
boostversion form its website into a directory calledabsolute_path_to_new_boosthereafter. - Apply the following procedure:
cd boost_subset_directory # where boost_subset_directory` is `boost` directory under the current directory containing this `README.md` file
diff -ur . ~/Software/boost_1_84_0/boost | grep -v 'Only in' > /tmp/my.patch
patch -p1 < /tmp/my.patch- Check that all files were correctly modified by invoking command
diff -ur . ~/Software/boost_1_84_0/boost | grep -v 'Only in': This command must produce no output. - Compile a
CPPprogram which contains#include <boost/asio.hpp> - If there are compilation errors because of missing
include files, copy missing files/directory form originalboostdirectory toboostsubset directory.