Solution: Getting error C2953 _CrtEnableIf after upgrading Visual Studio
-
Just a PSA about an error that had me scratching my head a while. Somebody else might get the same problem, so I though I'd post here.
We're using Qt 5.7.1 and Qt Creator, building C++ on Windows using MSVC2015.
I'd recently updated Visual Studio 2017 (not 2015) to do some work on a different, unrelated project for which I needed some web development modules I hadn't previously installed.
I then needed to build one of my Qt C++ projects. Nothing would build - error C2953 in one of the Windows header files.
Easy solution: rebuild the project. Don't just build it. The reason is that the VS2017 update process had updated the Platform SDK, which had a system-wide effect and my precompiled headers had the previous SDK's contents, and the newer build was trying to use the latest.
One of those things which is so obvious once you figure it out...