I am using Visual Studio 2017 for a C++ project (created with VS 2015). I get the following error:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afx.h(345): fatal error C1083: Cannot open include file: 'atltrace.h': No such file or directory
How can I install the ATL/MFC headers of the VS 2015 toolchain?
Details
- "Platform Toolset" setting (at "Project properties/General/Platform Toolset")
- set to "Visual Studio 2015 (v140),
- changing the platform toolset to "Visual Studio 2017 (v141) compiles fine.
- Files on disc
- The include directory for VS 2015 (
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\) containsafx*.hfiles but noatl*.hfiles. - These missing files seem to belong to
VC_ATL.Headers.msi("Visual C++ Library ATL Headers Package") (which I checked on another machine with those files). I could not get the respective msi to install. (I took the msi from the other machine.) Error: "To install this product, please run Setup.exe. [...]". - The respective directory for VS 2017 (
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\atlmfc\include\) does contain those files.
- The include directory for VS 2015 (
- Installer
- "Windows Desktop Development with C++/VC++ 2015.3 v140 toolset for desktop (x86,x64)" is checked.
- It seems to me that the v140 toolset is missing the ATL/MFC headers.
- "Windows Desktop Development with C++/MFC and ATL support(x86 and x64)" does not seem relevant, it seems to be about the VS 2017 version.
- VC++ redistributable seems irrelevant since those do not contain the header files.