Boost Tool • Feb 12, 2018 • Dewey Mao • Words:284 Download Boost Prebuilt windows binaries Current Release for Windows Compile Boost Install Boost installation package Use x86 Native Tools Command Prompt to conpile: boosttrap.bat Input command: b2 intall - Dynamic library: bjam install stage --toolset=msvc-12.0 --stagedir="C:\boost_1_62_0\lib64-msvc-12.0" link=shared runtime-link=shared threading=multi debug release - Static library: bjam install stage --toolset=msvc-12.0 --stagedir="C:\boost_1_62_0\lib64-msvc-12.0" link=static runtime-link=static threading=multi debug release Example // testBoost.h #ifndef TESTTOOLS_TESTBOOST_H_ #define TESTTOOLS_TESTBOOST_H_ namespace TEST_BOOST { bool testBoost(); } #endif // !TESTTOOLS_TESTBOOST_H_ // testBoost.cpp #include "stdafx.h" #include "testBoost.h" #include "boost/thread.hpp" bool TEST_BOOST::testBoost() { boost::function<void()> func([](){std::cout << "my thread!" << std::endl; }); boost::thread thread(func); thread.join(); std::cout << "my thread is over!" << std::endl; return true; } Reference boost The command prompt shortcuts are installed in a version-specific Visual Studio folder in your Start menu Demo: Tools ←Previous   |   Next→ Please enable JavaScript to view the comments powered by Disqus.