Skip to content

Patching Boost 1.55 for Visual Studio 2017

Jonathan Dent edited this page Aug 28, 2018 · 1 revision

Making Boost 1.55 compile with Visual Studio 2017

Download the patch and apply it with patch -p0 < boost-155-patch6.patch.

Content of the patch:

--- boost/config/auto_link.hpp	2018-08-28 11:37:00.491763200 -0500
+++ boost/config/auto_link.hpp	2018-08-28 11:38:48.247289700 -0500
@@ -161,11 +161,16 @@
      // vc12:
 #    define BOOST_LIB_TOOLSET "vc120"
 
-#  elif defined(BOOST_MSVC)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910)
 
      // vc14:
 #    define BOOST_LIB_TOOLSET "vc140"
 
+#  elif defined(BOOST_MSVC)
+
+     // vc15:
+#    define BOOST_LIB_TOOLSET "vc141"
+
 #  elif defined(__BORLANDC__)
 
      // CBuilder 6:
--- boost/config/compiler/visualc.hpp	2018-08-28 11:37:00.507419600 -0500
+++ boost/config/compiler/visualc.hpp	2018-08-28 11:39:34.836010900 -0500
@@ -266,8 +266,8 @@
 #endif
 
 //
-// last known and checked version is 19.00.24213 (VC15 update 3):
-#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190024213)
+// last known and checked version is 19.15.26726 (VC17):
+#if (_MSC_VER > 1800 && _MSC_FULL_VER > 191526726)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
Clone this wiki locally