Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 2.16 KB

File metadata and controls

53 lines (41 loc) · 2.16 KB

Boost to Standalone Asio Migration

This document describes the migration from Boost libraries to standalone Asio and standard C++ libraries.

Migration Summary

The following changes were made to remove Boost dependencies:

1. Library Replacements

  • boost::asiostandalone asio (version 1.28.0)
  • boost::filesystemstd::filesystem (C++17)
  • boost::system::error_codestd::error_code
  • boost::posix_timestd::chrono

2. Code Changes

  • All #include <boost/asio/...> replaced with #include <asio/...>
  • Added #define ASIO_STANDALONE before including asio headers
  • All #include <boost/filesystem.hpp> replaced with #include <filesystem>
  • Namespace changes: boost::asioasio, boost::filesystemstd::filesystem
  • Time handling: boost::posix_time::secondsstd::chrono::seconds

3. Project Configuration

  • All Visual Studio project files updated to:
    • Use $(SolutionDir)External\asio\include instead of boost include paths
    • Remove boost library dependencies
    • Add ASIO_STANDALONE preprocessor definition
    • Set C++ language standard to C++17 (required for std::filesystem)

4. Dependencies

  • Standalone Asio 1.28.0 is now located at: External/asio/
  • No external Boost libraries are required

Building the Project

Prerequisites

  • Visual Studio 2019 or later
  • Windows SDK with C++17 support

Build Steps

  1. Open BindstoneClient.sln in Visual Studio
  2. Ensure the configuration is set to your desired platform (x64/x86) and build type (Debug/Release)
  3. Build the solution (Ctrl+Shift+B or Build → Build Solution)

Troubleshooting

  • If you encounter errors about missing asio headers, ensure the External/asio folder exists
  • If you get C++ standard errors, verify that project files have <LanguageStandard>stdcpp17</LanguageStandard>
  • For any remaining boost references in your code, replace them with their standard library equivalents

Verification

To verify the migration was successful:

  1. Search for any remaining "boost::" references in the codebase
  2. Ensure no #include <boost/...> statements remain
  3. Verify all projects build successfully without boost libraries