Tag Archives: The header file

After the installation of vs2017, we can’t find the source files such as windows. H, stdio. H, etc

1. Problem description:
After the Visual Studio 2017 installation is complete, the source code prompts:
“Could not find source Windows.h”
“Could not find source file stdio.h”
“Could not find source file tchar.h”
The error code is as follows:

2. Causes of the problem:
The Windows 10 SDK for Desktop C++ [x86 and x64] (10.0.16299.0) module was omitted during the installation of VS2017.

3. Problem solving:
(1) Open VisualStudio Installer and click Modify in VisualStudio Installer.
(2) Select a single component;
(3) Check “Windows 10SDK (10.0.16299.0) for Desktop C++ [x86 and x64]” module, check this module will automatically add “Windows 10SDK (10.0.16299.0) for UWP(C ++)” and “Windows 10SDK (10.0.16299.0) for UWP(C#, VB, JS)” module;
(4) Finally click the Modify button to add these modules. Problem solved.

4. The operation process is as follows:






template with C linkage

Error: template with C linkage was encountered during compilation
It bothered me for a long time before I realized what the problem was.
I am using a mixture of C++ and C projects that have header files inside extern “C”,
There is also a section of header files outside of the extern “C”,
I added a C++ header file, but the error occurred because I wrote the header file inside the EXTERn “C”.
So, what files do I add, C++ STL library header files, so ~~~~~
So, the header file can not be added randomly.