# Boost issues on windows/VS2017

**URL:** https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350
**Category:** Build & Install
**Created:** [November 20, 2019, 9:30pm UTC](https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350 "2019-11-20T21:30:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![johnt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/johnt/32/147_2.png) [@johnt](https://discourse.kitware.com/u/johnt)
#### Post date: [November 20, 2019, 9:30pm UTC](https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350/1 "2019-11-20T21:30:03Z")

</div>

This is an FYI. In addition to requiring the `NO_LZMA` option ([link](https://discourse.kitware.com/t/boost-issue-on-mac-osx-with-cmb-superbuild-master/349/3)), I also had to add a “toolset” option to the boost build command:

```
toolset=msvc-14.1

```

Otherwise, VS2017 builds the boost the “vc142” version of the boost libs, e.g., `boost_program_options-vc142-mt-gd-x64-1_71.lib`, whereas the projects that consume boost require the vc141 build. I got no idea WHY the default settings build vc142, because VS tells me that I have `VC++ 2017 version 15.9 v14.16 latest v141 tools` installed and there is no sign of v142 tools.

---

<div class="post-metadata">

### Author: ![Haocheng\_Liu](https://discourse.kitware.com/user_avatar/discourse.kitware.com/haocheng_liu/32/36_2.png) [@Haocheng\_Liu](https://discourse.kitware.com/u/Haocheng_Liu)
#### Post date: [November 20, 2019, 9:34pm UTC](https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350/2 "2019-11-20T21:34:48Z")

</div>

vc142 is Visual Studio 2019. Maybe it’s because boost picks up the wrong toolset on your compter?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.kitware.com/u/ben.boeckel)
#### Post date: [November 20, 2019, 9:47pm UTC](https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350/3 "2019-11-20T21:47:46Z")

</div>

Some of this might be related to autolinking. Getting VTK to do the right autolinking magic (disabling it for Boost itself, but allowing it to do so for external libraries until [https://github.com/boostorg/boost\_install/issues/18](https://github.com/boostorg/boost_install/issues/18) is fixed). Here’s the Remus MR to make it work: [https://gitlab.kitware.com/cmb/remus/merge\_requests/62](https://gitlab.kitware.com/cmb/remus/merge_requests/62)

---

<div class="post-metadata">

### Author: ![chart3388](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@chart3388](https://discourse.kitware.com/u/chart3388)
#### Post date: [November 20, 2019, 9:53pm UTC](https://discourse.kitware.com/t/boost-issues-on-windows-vs2017/350/4 "2019-11-20T21:53:10Z")

</div>

I too had to add this option to boost to get it to build with VS2017. This was just build boost externally outside of the superbuild. Was relative for boost 1.66 and boost 1.67.
