Download source code
boost_1_66_0.7z
Generate compilation Tools
D:\Project\boost_1_66_0> bootstrap.bat
Configuring the Python environment variable (using the 32-bit python3 that VS2017 comes with)
Compiling a 32-bit boost library
D:\Project\boost_1_66_0> .\b2 install architecture=x86 address-model=32 --with-system --with-thread --with-date_time --with-regex --with-serialization --with-python link=static runtime-link=shared threading=multi debug
Create an empty project using virtual Studio 2017 and then add the source file
#include <iostream>#include <boost/asio.hpp>#include <boost/date_time/posix_time/posix_time.hpp>void print(const boost::system::error_code& /*e*/){ std::cout << "Hello, world!" << std::endl;}int main(){ boost::asio::io_context io; boost::asio::deadline_timer t(io, boost::posix_time::seconds(5)); t.async_wait(&print); io.run(); system("PAUSE"); return 0;}
Set up the Include directory for the project (Project->c/c++->, add-in directory, general)
Set up the project's library directory (add-in library directory, general---linker, project--)
Set up a library file for the project that needs to be linked (add-on dependency, input, project, linker, and so on)
Compiling the Run project (CTRL+F5)
Build Boost Library under Windows