Skip to content

Instantly share code, notes, and snippets.

@pqviet07
Last active July 20, 2021 07:22
Show Gist options
  • Save pqviet07/0328a9e10e1efaee7a9ee64a8496c011 to your computer and use it in GitHub Desktop.
Save pqviet07/0328a9e10e1efaee7a9ee64a8496c011 to your computer and use it in GitHub Desktop.
Cài đặt thư viện Boost

Cài thư viện Boost

  1. Vào thư mục vừa tải về, chạy file bootstrap.bat

    Hoặc gõ một trong các lệnh sau:

    bootstrap vc142 (if you are using Visual Studio 2019)
    bootstrap vc141 (if you are using Visual Studio 2017)
    bootstrap vc140 (if you are using Visual Studio 2015)
    bootstrap gcc (if you are using mingw)
  2. Mở cmd chạy lệnh:

    1. MSVC 2019

      b2 --build-dir=build/x64 address-model=64 threading=multi --build-type=complete --stagedir=./stage/x64 --toolset=msvc-14.2 -j 12
    2. GCC

      b2 --build-dir="path_to_your_boost_dir\build" --build-type=complete --prefix="path_to_dir_you_want_install" toolset=gcc install

Một cách ngắn gọn chỉ cần chạy 2 lệnh sau:

------------GCC---------------
bootstrap gcc
b2 toolset=gcc

-------------MSVC 2019---------------
bootstrap vc142
b2 toolset=msvc-14.2

-------------MSVC 2017---------------
bootstrap vc141
b2 toolset=msvc-14.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment