docs/contributing/how-to-add-new-msvs-version.md
This is confusing because there are several of them:
Help|About dialog, for example,
e.g. 16.1.4.cl /? output, e.g. 19.21.27702.2. This version
also corresponds to the value of the predefined _MSC_VER symbol.x being 0, 1 or 2
depending on the minor compiler version (00, 14 or 21).Moreover, historically, different IDE versions corresponded to different major compiler versions, however this hasn't been the case any more for the last few releases (2015, 2017, 2019 or 14, 15, 16 IDE versions) that all use the same major compiler version (19) as they are ABI-compatible. Also, historically, each compiler used its own toolset, but these last few versions can each use any of 140, 141, 142 toolset.
wxWidgets uses the IDE version for the project/solution files (but notice that project files are the same for all MSVS 201x versions) and the toolset version for the names of build directories.
Here is a list of things that need to be done when adding support for the next MSVS version:
__VISUALCxx__ symbol to
include/wx/compiler.h (xx here are the first 2 digits of the toolset
version, i.e. basically correspond to the major compiler version, except
that 13 was skipped for superstitious reasons, see the comment in that file).wxCOMPILER_PREFIX definition for the new version to
include/msvc/wx/setup.h.build/msw/wx_vcNN.sln (where NN is the internal
IDE version), typically by opening an existing solution in the new IDE and
letting it to update it.samples/samples_vcNN.sln, tests/test_vcNN.sln
and tests/test_gui_vcNN.sln in a similar way.how-to-add-new-sample.md in this
directory.build/msw/wx_config.props and add a new condition
checking VisualStudioVersion value for choosing the value of
PlatformToolset.README.mddocs/doxygen/mainpages/introduction.hdocs/msw/install.mddocs/release.mdbuild/tools/msvs/officialbuild.bat to support the new toolset version
and also update build/tools/msvs/buildall.bat to call it with this new version
(these files are used to build the official binaries for the releases).src/msw/main.cpp with the new version, check that this warning is still
harmless, i.e. that catching Win32 exceptions still works correctly (this
can be tested with the "Crash" menu item in the except sample) and update
the version check in include/wx/msw/seh.h to suppress this warning for the
new version too.VISUALSTUDIOVERSION in build/bakefiles/common.bkl to
take the new version into account.