'error: cannot open source file "winrt/WIndows.Foundation" showed up when I follow a microsoft's tutorial
I'm a complete beginner in Visual Studio and C++. And now, I'm trying to follow this tutorial by Microsoft.
So I installed "c++/WinRT templates and visualizer" in my Visual Studio 2019 from the "Extension" menu above the visual studio and created a core app project.
However, when I run the project, visual Studio shows up lots of errors like "cannot open source file "winrt/Windows.Foundation.h".(I tried to follow this section )
I suspect that these errors are environment variable issues. But I don't have any idea of where I should change.
Currently, I install Visual Studio in D drive and create the project in D drive. But there's a possibility that other required software like windows SDK(?) are installed in C Drive.
If there is other information required to solve these errors, I'm willing to add it to this post.
I'm terribly stuck here(like a lost child). I'm not sure even asking this question here is acceptable. But if you help me, I would appreciate it a lot.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


