6

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'

enter image description here

And idea how to fix this?

c00000fd
  • 20,994
  • 29
  • 177
  • 400
  • 1
    You need to configure Visual Studio so it knows where your Windows SDK is. Sometimes the SDK itself has a tool. Google it. – Joseph Willcoxson May 31 '17 at 02:00
  • *"But then when I go to `Resources`"* - That needs a bit more detail. Are you referring to resources in your solution explorer? Some menu entry? Opening the resource script in a text editor? Opening a resource from the solution explorer? – IInspectable May 31 '17 at 11:56
  • @IInspectable: Yes, solution explorer. Although I did fix the issue by uninstalling VS2017 and downgrading to VS2015. That one was [too buggy](https://stackoverflow.com/questions/43315800/vs2017-cannot-find-the-resource-compiler-dll-please-make-sure-the-path-is-cor). – c00000fd May 31 '17 at 19:43
  • It's [probably still in beta](https://developercommunity.visualstudio.com/content/problem/43024/ide-cannot-find-the-resource-compiler-dll-rcdlldll.html). – c00000fd May 31 '17 at 19:51

7 Answers7

6

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. enter image description here

You can check your OS version from the cmd tool. enter image description here

Jeff T.
  • 2,193
  • 27
  • 32
2

Jeff T. answer is great if you have a single project.

If you have many projects in which you have to change the target Windows SDK (or if you want to make sure they all match), you'll probably prefer to use the Retarget Solution button found when right clicking on the solution: 1. Right click on solution, 2. "Retarget Solution"

Then just select some Windows SDK version that you have installed, and apply it to all (or whatever) projects you need to change: 3. List of Windows SDK to choose and apply to all projects

That list of Windows SDK versions will probably show some that don't really work. You might have to try.

Mariano Desanze
  • 7,847
  • 7
  • 46
  • 67
1

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).

Manas
  • 21
  • 3
1

You should install the framework MFC
enter image description here

0

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

Dan Bradbury
  • 2,071
  • 2
  • 21
  • 27
0

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.

Vizor
  • 396
  • 3
  • 14
-1

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

Santosh Dhanawade
  • 1,756
  • 14
  • 29