Skip to content

Removing compiler warning from Boost 1.66

Jonathan Dent edited this page Sep 4, 2018 · 2 revisions

Removing the 'Boost.config is older than your compiler' warning.

  • First, find the exact version number of the VS C++ compiler. This can be determined by opening an x64 native tools command prompt and typing 'cl' (without parenthesis).

  • Find the following file in your Boost directory: boost\config\compiler\visualc.hpp

  • Locate the version number check (somewhere around line 320). For example, in Boost 1.66 it is on line 330 and looks like this:

#if (_MSC_VER > 1911)
#  if defined(BOOST_ASSERT_CONFIG)
#     error "Boost.Config is older than your current compiler version."
#  elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
#     pragma message("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version.  Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
#  endif
#endif
  • Change the version number of the line if (_MSC_VER > 1911) to whatever the first four digits of your C++ compiler are. For instance, if 'cl' gives you 19.15.26726, then the line should be modified to say if (_MSC_VER > 1915).
  • Save the file. The warnings should not appear the next time you compile Boost
Clone this wiki locally