VS 2017: fatal error RC1015: cannot open include file 'winres.h'

我与影子孤独终老i 提交于 2020-03-21 20:46:17

问题


I just downloaded Visual Studio 2017 and converted my dialog-based C++/MFC project with it (from Visual Studio 2008 SP1.) But then when I go to Resources it shows this error:

fatal error RC1015: cannot open include file 'winres.h'

And idea how to fix this?


回答1:


I just also came across this issue. It seems my friend missed to push some VS 2017 meta file to the server. My quick solution is to change the Windows SDK version to match the Windows 10 OS version or below.

You can check your OS version from the cmd tool.




回答2:


The missing files are located in two directories: C:\Program Files\Windows Kits\10\Include\10.0.15063.0\um C:\Program Files\Windows Kits\10\Include\10.0.15063.0\shared

Add the two paths to project properties (Project >> ...Properties >> Configuration Properties >> VC++ Directories >> Include Directories).




回答3:


For anyone who stumbles onto this question is in the same boat as me (tried all of the above with no luck)..

I just created a fresh project and created a resource immediately (no issue) and then went ahead and readded all the code / libs that were needed. A bit annoying but I'm sure it was a mistake I made while configuring the project settings

Hopefully this helps someone out




回答4:


I my case, it was caused by wrong project configuration. Specifically Property Pages -> VC++ Directories -> Include Directories and there check Inherit from parent or project defaults.




回答5:


Probably VS2017 fatal error RC1015 when attempting to add a new resource. fellow also got this error with VS2017.



来源:https://stackoverflow.com/questions/44271668/vs-2017-fatal-error-rc1015-cannot-open-include-file-winres-h

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!