Usman Tariq
Usman Tariq

Reputation: 121

How to compile Boost library with Visual Studio 2022 ( Preview 3)

Apparently vc143 is unsupported and i cannot seem to make the toolset commands to work with the following commands in powershell:

./bootstrap.bat gcc OR ./bootstrap.bat mingw OR ./bootstrap.bat msvc

Boost version is 1.77

Regards, Usman

Upvotes: 12

Views: 23368

Answers (3)

Hamza Ahmed
Hamza Ahmed

Reputation: 1811

Now that VS 2022 is released and the version of Boost is boost_1_79_0 the process is simple.

  1. Download the windows boost libraries from https://www.boost.org/users/history/version_1_79_0.html
  2. Unzip to a path of your choice for eg E:\boost_1_79_0
  3. Open Developer Command Prompt For VS 2022 and cd into extracted boost directory
  4. Issue the command bootstrap vc143 hit Enter and wait
  5. Next issue the command .\b2 hit Enter and grab tea or coffee.

On successful completion the above procedure will build boost static libraries found in eg E:\boost_1_79_0\stage\lib

Hope it helps.

Upvotes: 7

larsgregersen
larsgregersen

Reputation: 171

I have made it work, but it requires a lot of changes to a few files in order to make it work.

I've put my procedure here: https://github.com/boostorg/boost/issues/552

Hopefully someone can include the changes into Boost itself.

Upvotes: 7

Related Questions